[gmx-users] How to create correct .gro file?

Lam Nguyen Sy thelord_voldemort at yahoo.com
Sat Jul 7 12:44:09 CEST 2007


Thanks Mark,

Before posing this question, I did try to make a
Gromacs-similar .gro file with all I could see in the
one created by Gromacs.
I removed my first two lines (the title and the number
of atoms) and my last line (box vectors), then copied
the equivalent lines of a real .gro file (the content
of these line in my .gro file and in Gromacs' was
exactly the same).
After I did so, VMD could visualize my .gro file. And
VMD worked with either just the first two lines or the
last line in my .gro file was replaced by the
real-.gro one, while the other was left unaffected.

So, what is the correct format for the first two lines
and the last line in a .gro file created by C++?

Thank you very much,

nslam 

 

--- Mark Abraham <mark.abraham at anu.edu.au> wrote:

> > Dear friends,
> >
> > I'm trying to create a .gro file by myself with a
> C++
> > program. I created a file with the following
> format:
> > "%5d%5s%5s%5d%8.3lf%8.3lf%8.3lf"
> > and at the end, I put a line containing the
> components
> > of the box vectors (with the exact order that it
> > should be).
> > But, when I used VMD to visualize my new .gro
> file, it
> > didn't show me anything, and there appeared some
> > messages on VMD console like this:
> >
> > Info) Using plugin gro for structure file
> basin1_t.gro
> > Warning, error reading box, unexpected end-of-file
> > reached
> 
> Bingo... "unexpected end of file". The .gro format
> requires the first few
> lines to be a title and a number of atoms. If you
> omit these, then some
> readers will blindly make the best of what *is* on
> those two lines and
> then carry on with attempting to read the file. Go
> and look at some real
> .gro files and copy their format more closely.
> 
> Mark
> 
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at
> http://www.gromacs.org/search before posting!
> 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
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  



More information about the gromacs.org_gmx-users mailing list