RE: vmd-l: incompatibility between VMD & NAMD for reading Amber crd files

From: Kamp, Marc vander (Marc.vanderKamp_at_wur.nl)
Date: Tue Jun 22 2004 - 04:20:16 CDT

John,
 
You are right, I turns out to be a rst7 file after all.
I just assumed it was a crd-file, because I got it by using the saveamberparm command in tleap (or actually teLeap), the program used in AMBER to build the parmtop-files. I use the version of teLeap that is included in the NAB-distribution (v. 4.6) freely available at http://www.scripps.edu/case/ (I don't have the AMBER-suite).
I automatically asumed that teLeap writes crd-files when using the saveamberparm command, as seems to follow from the NAB-documentation (http://www.scripps.edu/case/nab5/NAB-sh-9.7.html#sh-9.7.54 ):
 
saveAmberParm

        
        saveAmberParm unit topologyfilename coordinatefilename

                UNIT unit
                STRING topologyfilename
                STRING coordinatefilename
                

        Save the AMBER/SPASMS topology and coordinate files for the UNIT into the files named topologyfilename and coordinatefilename respectively. This command will cause LEAP to search its list of PARMSETs for parameters defining all of the interactions between the ATOMs within the UNIT. This command produces topology files and coordinate files that are identical in format to those produced by AMBER PARM and can be read into AMBER and SPASMS for calculations. The output of this operation can be used for minimizations, dynamics, and thermodynamic perturbation calculations.

Apperently, actually rst7 files which hold the coordinates (and velocity and box-size info) are written, in stead of a simple crd file (holding only coordinates).
 
Still, the issue remains that VMD and NAMD treat these files differently. Maybe it should be mentioned in the description of the 'ambercoor' command in the NAMD user guide that the coordinates should be in rst7 format, or at least that there should be an title/empty line before the number of atoms followed by the coordinates. If there is no title or empty line, NAMD stops before starting calculations with the following message:
FATAL ERROR: Num of atoms in coordinate file is different from that in parm file!
 
I guess that the first coordinate is now read as the number of atoms, (the number of atoms being read as title line). If the number of atoms is on the second line, NAMD runs fine.
 
Regards,
Marc

        -----Original Message-----
        From: John Stone [mailto:johns_at_ks.uiuc.edu]
        Sent: Mon 21-6-2004 21:53
        To: Kamp, Marc vander
        Cc: namd-l_at_ks.uiuc.edu; vmd-l_at_ks.uiuc.edu
        Subject: Re: vmd-l: incompatibility between VMD & NAMD for reading Amber crd files
        
        

        Marc,
          If the file contains a blank line followed by the number of atoms
        on a second line, then it is a coordinate restart file according to
        the amber file format docs:
          http://amber.scripps.edu/formats.html#restart
        
        These files are read by the VMD "rst7" plugin as I mentioned.
        
        The VMD "crd" plugin only reads in Amber coordinate trajectory files.
        They contain a title line (typically just a blank line...)
        followed by all the coordinates:
          http://amber.scripps.edu/formats.html#trajectory
        
        If you've got a 'crd' file that differs from the Amber documentation I
        gave links to above, then that would be interesting to know about, since
        all I've got to go on are the file format specifications that they publish
        on their web site.
        
        Thanks,
          John Stone
          vmd_at_ks.uiuc.edu
        
        On Mon, Jun 21, 2004 at 09:39:05PM +0200, Kamp, Marc vander wrote:
> Hello John,
>
> It is actually really a crd file that I'm reading into VMD (just the number of atoms followed by all coordinates, without any other info). I read in a amber parmtop file first, and then the crd file that holds coordinates for this parmtop-file.
> (The text-commands in VMD are the following:
> vmd > mol new test.parm7
> vmd > mol addfile test.crd )
>
> In the display, you immediately see that the number of atoms is mistaken for a coordinate, because there is one atom far from all others. And as I said, by deleting the first empty line in the crd file, the problem is solved and the correct structure is displayed.
> It shouldn't be to hard to correct such a thing in VMD, should it? (Although I do not know anything about the VMD source code...)
>
> Regards,
> Marc
>
> -----Original Message-----
> From: John Stone [mailto:johns_at_ks.uiuc.edu]
> Sent: Mon 21-6-2004 16:58
> To: Kamp, Marc vander
> Cc: namd-l_at_ks.uiuc.edu; vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: incompatibility between VMD & NAMD for reading Amber crd files
>
>
>
>
> Marc,
> It sounds like you are trying to load restart files, not 'crd' files.
> VMD supports the new restart file format used by Amber 7, but not the
> old version of the format. The 'crd' reader in VMD reads trajectory files
> only, and does not read the restart files. The organization of the various
> Amber file formats is unwieldy for VMD as there's no decent way to detect which
> type of file it is a priori. That being said, I do think we can make some
> improvements to the way VMD reads the various Amber files, at some expense
> in performance. If you're working with Amber 7 files, try loading your
> structure using the 'rst7' plugin and let me know if you still have trouble.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Mon, Jun 21, 2004 at 02:33:11PM +0200, Kamp, Marc vander wrote:
> > Dear all / VMD-developers,
> >
> > I am using amber-type parameters in namd. I create the AMBER format input files using the tleap-program (which is included in the NAB-distribution available from the Case-group).
> > The parmtop file can be read in into VMD without a problem (if you use the parm7 extension the file is automatically recognised) but reading in the crd file as was created by tleap doesn't go well; VMD reads the number of atoms as the first coordinate. This can simply be solved by deleting the first empty line of the crd-file (which makes the number of atoms the first line).
> > However, if you want to use the crd file as input coordinates in NAMD (using 'ambercoor'), the first line must be empty again (otherwise the coordinates are not correctly understood, leading to 'infinite' energies in minimization).
> >
> > Of course this is not a very urgent problem, but it would be nice if NAMD and VMD would treat crd files equally. As NAMD can directly use the crd-files that are created with AMBER-suite programs, it would in my opinion be best to change the crd-reading possibility in VMD.
> >
> > Best to you all,
> > Marc
> >
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
>
>
        
        --
        NIH Resource for Macromolecular Modeling and Bioinformatics
        Beckman Institute for Advanced Science and Technology
        University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
        Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
          WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
        

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:38:44 CST