VMD-L Mailing List
From: Bogdan Costescu (bcostescu_at_gmail.com)
Date: Tue Jul 24 2012 - 08:19:48 CDT
- Next message: Jim Kress: "RE: Problem with Reading GROMACS file in VMD"
- Previous message: Jan-Philip Gehrcke: "Scripting API: are arguments to representation types documented somewhere?"
- In reply to: satya kumar: "Re: Problem with Reading GROMACS file in VMD"
- Next in thread: Bogdan Costescu: "Re: Problem with Reading GROMACS file in VMD"
- Reply: Bogdan Costescu: "Re: Problem with Reading GROMACS file in VMD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Tue, Jul 24, 2012 at 2:21 PM, satya kumar <mail2mvskumar_at_gmail.com> wrote:
> There is no white space between Y and Z coordinates, due to which Z
> coordinate is read as 000.000, 000.110 and multiplied by a factor of 10 to
> convert them to A.
I now better understand your problem. It seems to me that the VMD
reader plugin assumes that the format is "%7.3f" and that there is a
separator character between the different coordinate columns. I don't
have access to the plugins source code right now... If someone can
confirm this, then the reader plugin is indeed at fault.
BTW, the GROMACS read/write functions for GRO files are located in:
http://repo.or.cz/w/gromacs.git/blob/HEAD:/src/gmxlib/confio.c
The writing for GRO files is done in write_hconf_indexed_p() with
"%8.3f%8.3f%8.3f". Although the format is built on the fly to allow
for flexible formatting, it's always called with a precision of 3 and
the total is calculated as 5+3 (in make_hconf_format()). The reading
side is a bit complex because the floating point precision can
theoretically change and it's determined from the distance between two
dots. I don't know about historical reasons for it, but in modern
times the precision for writing is fixed to 3, so all GRO files
produced by current versions of GROMACS should follow the documented
format.
Cheers,
Bogdan
- Next message: Jim Kress: "RE: Problem with Reading GROMACS file in VMD"
- Previous message: Jan-Philip Gehrcke: "Scripting API: are arguments to representation types documented somewhere?"
- In reply to: satya kumar: "Re: Problem with Reading GROMACS file in VMD"
- Next in thread: Bogdan Costescu: "Re: Problem with Reading GROMACS file in VMD"
- Reply: Bogdan Costescu: "Re: Problem with Reading GROMACS file in VMD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]