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

Mark Abraham mark.abraham at anu.edu.au
Sat Jul 7 04:18:38 CEST 2007


> 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




More information about the gromacs.org_gmx-users mailing list