VMD-L Mailing List
From: Nicolas (nsapay_at_ucalgary.ca)
Date: Thu Jul 31 2008 - 19:32:16 CDT
- Next message: Axel Kohlmeyer: "Re: Gromacs reading: Why scaling??"
- Previous message: Nicolas Bigaouette: "Re: Gromacs reading: Why scaling??"
- In reply to: Nicolas Bigaouette: "Gromacs reading: Why scaling??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Nicolas Bigaouette a écrit :
> I have create some .gro which looks like this:
> [...]
> 1E E 2 0.000 0.200 0.200 0.0000 0.0000 0.0000
> [...]
> But when I import them in VMD, the position are multiplied by 10, so
> it is (0,2,2) instead of (0,0.2,0.2)
>
> It did not happen with other file format (VTF). I checked the source,
> and to my surprise there is a comment at the begining of Gromacs.h:
> * o gro_rec() assumes positions in .gro files are nanometers and
> * converts to angstroms, whereas they really could be any unit
> and a couple of lines later, there is a degine:
> #define ANGS_PER_NM 10
>
> Why is it converting the file's value?? If the data file is wrong,
> then I prefer changing it myself then having to hack VMD's code to
> remove the scaling factor. The file says 0.2, I want to see 0.2 in VMD.
>
> I did a patch to change that:
>
> --- plugins/molfile_plugin/src/Gromacs.h.orig 2008-07-31
> 19:26:41.000000000 -0400
> +++ plugins/molfile_plugin/src/Gromacs.h 2008-07-31
> 19:27:11.000000000 -0400
> @@ -96,8 +96,10 @@
> #define MAX_G96_LINE 500 // Maximum line length of .g96 files
> #define MAX_TRX_TITLE 80 // Maximum length of a title in .trX
> #define MAX_MDIO_TITLE 80 // Maximum supported title length
> -#define ANGS_PER_NM 10 // Unit conversion factor
> -#define ANGS2_PER_NM2 100 // Unit conversion factor
> +//#define ANGS_PER_NM 10 // Unit conversion factor
> +//#define ANGS2_PER_NM2 100 // Unit conversion factor
> +#define ANGS_PER_NM 1 // Unit conversion factor
> +#define ANGS2_PER_NM2 1 // Unit conversion factor
>
>
> // All the supported file types and their respective extensions
>
Gromacs works with SI unit (nm, kJ/mol, ...) while VMD works with
Angstroms. So, the coordinates of your gro file are just converted in
Angstrom, they are not scaled. All the distances, angles etc.. are
exactly the same in Gromacs and VMD.
Nicolas
- text/x-vcard attachment: nsapay.vcf
- Next message: Axel Kohlmeyer: "Re: Gromacs reading: Why scaling??"
- Previous message: Nicolas Bigaouette: "Re: Gromacs reading: Why scaling??"
- In reply to: Nicolas Bigaouette: "Gromacs reading: Why scaling??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]