From: Teletchéa Stéphane (steletch_at_biomedicale.univ-paris5.fr)
Date: Thu Jul 31 2003 - 12:49:27 CDT

Le lun 28/07/2003 à 22:45, Anshul Shah a écrit :
> Hi all,
>
> I am a new user of VMD and Amber. I am having a problem that sounds
> similar to something I read in the list archives. When I try to open
> Amber 7.0 format .prmtop and .inpcrd files in VMD 1.8.1, the molecule I
> get is very much distorted; that is, the bonds are very obviously not in
> their proper configuration. The original .pdb file looks fine in VMD,
> but I get this problem after using Amber Leap to generate the .prmtop
> and .inpcrd files. It seems that either Leap went wrong, or VMD is not
> using the two files correctly. Does anyone what this problem might be,
> or how I can fix it?
>
> Thanks,
> Anshul

This is a bug of vmd reader, it has a problem for reading single crd
files.
The problems comes from amber's denomination which is quite untrivial.

When you build a structure, you get a inpcrd file :
---------------------------------------------------------------------
Format description :
FORMAT(20A4) ITITL
  ITITL : the title of the current run, from the AMBER
           parameter/topology file

FORMAT(I5,5E15.7) NATOM,TIME
  NATOM : total number of atoms in coordinate file
  TIME : option, current time in the simulation (picoseconds)

FORMAT(6F12.7) (X(i), Y(i), Z(i), i = 1,NATOM)
  X,Y,Z : coordinates
IF dynamics
FORMAT(6F12.7) (VX(i), VY(i), VZ(i), i = 1,NATOM)
  VX,VY,VZ : velocities (units: Angstroms per 1/20.455 ps)
IF constant pressure (in 4.1, also constant volume)
FORMAT(6F12.7) BOX(1), BOX(2), BOX(3)
  BOX : size of the periodic box

example :
[stephane_at_pc-54-149 crd]$ head file.crd
Titre du fichier base.linkin
  629
  -0.8080000 -8.8730001 -2.0799999 0.2700000 -7.7249999 -1.8300000
...

---------------------------------------------------------------------

When you run a dynamics you get a mdcrd file.
 Format description :
FORMAT(20A4) ITITL
  ITITL : the title of the current run, from the AMBER
           parameter/topology file
The following snapshot is written every NTWX steps in the trajectory
(specified in the control input file):
FORMAT(10F8.3) (X(i), Y(i), Z(i), i=1,NATOM)
  X,Y,Z : coordinates or velocities (velocity units: Angstroms per 1/20.455 ps)

example :
[stephane_at_pc-54-149 crd]$ head file.rst
Titre du fichier base.linkin
   0.323 -9.832 -4.264 0.818 -9.366 -3.245 2.027 -8.556
-3.295 2.020

---------------------------------------------------------------------

To complicate it, can have box info size, so you get 4 possibilities.

VMD reads the second but not the first correctly (it names it crd, but
in reality it is rather a mdcrd/rst file).

'Removing the first line of the inpcrd trick' works only because the
difference between inpcrd and mdcrd/rst is essentially the
FORMAT(I5,5E15.7) NATOM,TIME which is different.
Nevertheless, file formats are quite different : 6 columns for inpcrd
with 7 decimals precision and 10 columns for mdcrd/rst with 3 decimals
precision.

So the vmd reader has never completely read the inpcrd correctly but
removing the first line helps this, even if in that cas i'm not sure of
the internal precision it uses -certainly not essential for
visualisation-.

Finally, amber 7 has switched to another parameter file, so you now hqve
another degree of complexity ...

I'm ready to provide other examples as required to fix this annoying
bug.

For VMD developpers, there is a description of amber formats in
http://amber.scripps.edu/formats.html

Stef

-- 
Teletchéa Stéphane <steletch_at_biomedicale.univ-paris5.fr>