Project

General

Profile

Bug #347

g_rmsdist results depend on the box

Added by Soeren Enemark almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
analysis tools
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Created an attachment (id=390)
Input and output files from bug test described above.

Using g_rmsdist can give different results depending on the box of the structure for comparison.

That is, the two commands:

1. g_rmsdist -f md.xtc -s structure_box1.gro
2. g_rmsdist -f md.xtc -s structure_box2.gro

can give significantly different results.

TEST PROCEDURE:

1. Create a copy of a structure file:

editconf -f gly.gro -o gly_box1.gro

2. Create another copy of the same structure but change the box values:

editconf -f gly.gro -o gly_box2.gro -box 4 4 4 -noc

3. Check that the difference between the structures (gly_box1.gro and gly_box2.gro) are indeed only in the box values:

diff gly_box1.gro gly_box2.gro

4. Compare the first copy with the original structure:

g_rmsdist -f gly.gro -s gly_box1.gro -o rmsdist_box1

5. Compare the second copy with the original structure:

g_rmsdist -f gly.gro -s gly_box2.gro -o rmsdist_box2

6. Compare the output from the two analyses:

diff rmsdist_box1.xvg rmsdist_box2.xvg

TEST RESULTS:

[extchees@axle TESTG_DISTRMSD]$ ls
2ndTEST distrmsd.xvg gly.gro gly.pdb posre.itp topol.top
[extchees@axle TESTG_DISTRMSD]$ editconf f gly.gro -o gly_box1.gro
:
) G R O M A C S (-:

Good gRace! Old Maple Actually Chews Slate
:-)  VERSION 4.0.3  (-:
Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2008, The GROMACS development team,
check out http://www.gromacs.org for more information.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
:-)  editconf  (-:

Option Filename Type Description
------------------------------------------------------------
-f gly.gro Input Structure file: gro g96 pdb tpr tpb tpa
-n index.ndx Input, Opt. Index file
-o gly_box1.gro Output, Opt! Structure file: gro g96 pdb
-mead mead.pqr Output, Opt. Coordinate file for MEAD
-bf bfact.dat Input, Opt. Generic data file

Option Type Value Description
------------------------------------------------------
h bool no Print help info and quit
-nice int 0 Set the nicelevel
[no]w bool no View output xvg, xpm, eps and pdb files
ndef bool no Choose output from default index groups
-bt enum triclinic Box type for -box and -d: triclinic, cubic,
dodecahedron or octahedron
-box vector 0 0 0 Box vector lengths (a,b,c)
-angles vector 90 90 90 Angles between the box vectors (bc,ac,ab)
-d real 0 Distance between the solute and the box
[no]c bool no Center molecule in box (implied by box and -d)
-center vector 0 0 0 Coordinates of geometrical center
-translate vector 0 0 0 Translation
-rotate vector 0 0 0 Rotation around the X, Y and Z axes in degrees
[no]princ bool no Orient molecule(s) along their principal axes
scale vector 1 1 1 Scaling factor
-density real 1000 Density (g/l) of the output box achieved by
scaling
[no]pbc bool no Remove the periodicity (make molecule whole again)
grasp bool no Store the charge of the atom in the B-factor
field and the radius of the atom in the occupancy
field
-rvdw real 0.12 Default Van der Waals radius (in nm) if one can
not be found in the database or if no parameters
are present in the topology file
-sig56 real 0 Use rmin/2 (minimum in the Van der Waals
potential) rather than sigma/2
[no]vdwread bool no Read the Van der Waals radii from the file
vdwradii.dat rather than computing the radii
based on the force field
atom bool no Force B-factor attachment per atom
[no]legend bool no Make B-factor legend
-label string A Add chain label for all residues

Opening library file /apps/gromacs4/share/gromacs/top/aminoacids.dat
WARNING: masses will be determined based on residue and atom names,
this can deviate from the real mass of the atom type
Opening library file /apps/gromacs4/share/gromacs/top/atommass.dat
Entries in atommass.dat: 178
WARNING: vdwradii will be determined based on residue and atom names,
this can deviate from the real mass of the atom type
Opening library file /apps/gromacs4/share/gromacs/top/vdwradii.dat
Entries in vdwradii.dat: 28
Opening library file /apps/gromacs4/share/gromacs/top/dgsolv.dat
Entries in dgsolv.dat: 7
Opening library file /apps/gromacs4/share/gromacs/top/electroneg.dat
Entries in electroneg.dat: 71
Opening library file /apps/gromacs4/share/gromacs/top/elements.dat
Entries in elements.dat: 218
Read 10 atoms
Volume: 0.0234508 nm^3, corresponds to roughly 0 electrons
No velocities found

gcq#113: "I Don't Like Dirt" (The Breeders)

[extchees@axle TESTG_DISTRMSD]$ editconf f gly.gro -o gly_box2.gro -box 4 4 4 -noc
:
) G R O M A C S (-:

Go Rough, Oppose Many Angry Chinese Serial killers
:-)  VERSION 4.0.3  (-:
Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2008, The GROMACS development team,
check out http://www.gromacs.org for more information.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
:-)  editconf  (-:

Option Filename Type Description
------------------------------------------------------------
-f gly.gro Input Structure file: gro g96 pdb tpr tpb tpa
-n index.ndx Input, Opt. Index file
-o gly_box2.gro Output, Opt! Structure file: gro g96 pdb
-mead mead.pqr Output, Opt. Coordinate file for MEAD
-bf bfact.dat Input, Opt. Generic data file

Option Type Value Description
------------------------------------------------------
h bool no Print help info and quit
-nice int 0 Set the nicelevel
[no]w bool no View output xvg, xpm, eps and pdb files
ndef bool no Choose output from default index groups
-bt enum triclinic Box type for -box and -d: triclinic, cubic,
dodecahedron or octahedron
-box vector 4 4 4 Box vector lengths (a,b,c)
-angles vector 90 90 90 Angles between the box vectors (bc,ac,ab)
-d real 0 Distance between the solute and the box
[no]c bool no Center molecule in box (implied by box and -d)
-center vector 0 0 0 Coordinates of geometrical center
-translate vector 0 0 0 Translation
-rotate vector 0 0 0 Rotation around the X, Y and Z axes in degrees
[no]princ bool no Orient molecule(s) along their principal axes
scale vector 1 1 1 Scaling factor
-density real 1000 Density (g/l) of the output box achieved by
scaling
[no]pbc bool no Remove the periodicity (make molecule whole again)
grasp bool no Store the charge of the atom in the B-factor
field and the radius of the atom in the occupancy
field
-rvdw real 0.12 Default Van der Waals radius (in nm) if one can
not be found in the database or if no parameters
are present in the topology file
-sig56 real 0 Use rmin/2 (minimum in the Van der Waals
potential) rather than sigma/2
[no]vdwread bool no Read the Van der Waals radii from the file
vdwradii.dat rather than computing the radii
based on the force field
atom bool no Force B-factor attachment per atom
[no]legend bool no Make B-factor legend
-label string A Add chain label for all residues

Opening library file /apps/gromacs4/share/gromacs/top/aminoacids.dat
WARNING: masses will be determined based on residue and atom names,
this can deviate from the real mass of the atom type
Opening library file /apps/gromacs4/share/gromacs/top/atommass.dat
Entries in atommass.dat: 178
WARNING: vdwradii will be determined based on residue and atom names,
this can deviate from the real mass of the atom type
Opening library file /apps/gromacs4/share/gromacs/top/vdwradii.dat
Entries in vdwradii.dat: 28
Opening library file /apps/gromacs4/share/gromacs/top/dgsolv.dat
Entries in dgsolv.dat: 7
Opening library file /apps/gromacs4/share/gromacs/top/electroneg.dat
Entries in electroneg.dat: 71
Opening library file /apps/gromacs4/share/gromacs/top/elements.dat
Entries in elements.dat: 218
Read 10 atoms
Volume: 0.0234508 nm^3, corresponds to roughly 0 electrons
No velocities found
new box vectors : 4.000 4.000 4.000 (nm)
new box angles : 90.00 90.00 90.00 (degrees)
new box volume : 64.00 (nm^3)

gcq#271: "I Need Love, Not Games" (Iggy Pop & Kate Pierson)

[extchees@axle TESTG_DISTRMSD]$ diff gly_box1.gro gly_box2.gro
13c13
< 0.32099 0.38407 0.19022
---

4.00000 4.00000 4.00000

[extchees@axle TESTG_DISTRMSD]$ g_rmsdist f gly.gro -s gly_box1.gro -o rmsdist_box1
:
) G R O M A C S (-:

Gravel Rubs Often Many Awfully Cauterized Sores
:-)  VERSION 4.0.3  (-:
Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2008, The GROMACS development team,
check out http://www.gromacs.org for more information.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
:-)  g_rmsdist  (-:

Option Filename Type Description
------------------------------------------------------------
-f gly.gro Input Trajectory: xtc trr trj gro g96 pdb cpt
-s gly_box1.gro Input Structure+mass(db): tpr tpb tpa gro g96 pdb
-n index.ndx Input, Opt. Index file
-equiv equiv.dat Input, Opt. Generic data file
-o rmsdist_box1.xvg Output xvgr/xmgr file
-rms rmsdist.xpm Output, Opt. X PixMap compatible matrix file
-scl rmsscale.xpm Output, Opt. X PixMap compatible matrix file
-mean rmsmean.xpm Output, Opt. X PixMap compatible matrix file
-nmr3 nmr3.xpm Output, Opt. X PixMap compatible matrix file
-nmr6 nmr6.xpm Output, Opt. X PixMap compatible matrix file
-noe noe.dat Output, Opt. Generic data file

Option Type Value Description
------------------------------------------------------
h bool no Print help info and quit
-nice int 19 Set the nicelevel
-b time 0 First frame (ps) to read from trajectory
-e time 0 Last frame (ps) to read from trajectory
-dt time 0 Only use frame when t MOD dt = first time (ps)
[no]w bool no View output xvg, xpm, eps and pdb files
xvgr bool yes Add specific codes (legends etc.) in the output
xvg files for the xmgrace program
-nlevels int 40 Discretize rms in # levels
-max real -1 Maximum level in matrices
[no]sumh bool yes average distance over equivalent hydrogens

Opening library file /apps/gromacs4/share/gromacs/top/aminoacids.dat
Group 0 ( System) has 10 elements
Group 1 ( Protein) has 10 elements
Group 2 ( Protein-H) has 5 elements
Group 3 ( C-alpha) has 1 elements
Group 4 ( Backbone) has 3 elements
Group 5 ( MainChain) has 5 elements
Group 6 (MainChain+Cb) has 5 elements
Group 7 ( MainChain+H) has 8 elements
Group 8 ( SideChain) has 2 elements
Group 9 ( SideChain-H) has 0 elements
Select a group: 0
Selected 0: 'System'
Reading frames from gro file 'GLYCINE', 10 atoms.
Last frame 0 time 0.000

rmsmax = -1000, rmscmax = inf

gcq#72: "Breaking the Law, Breaking the Law" (Judas Priest)

[extchees@axle TESTG_DISTRMSD]$ g_rmsdist f gly.gro -s gly_box2.gro -o rmsdist_box2
:
) G R O M A C S (-:

Giving Russians Opium May Alter Current Situation
:-)  VERSION 4.0.3  (-:
Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2008, The GROMACS development team,
check out http://www.gromacs.org for more information.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
:-)  g_rmsdist  (-:

Option Filename Type Description
------------------------------------------------------------
-f gly.gro Input Trajectory: xtc trr trj gro g96 pdb cpt
-s gly_box2.gro Input Structure+mass(db): tpr tpb tpa gro g96 pdb
-n index.ndx Input, Opt. Index file
-equiv equiv.dat Input, Opt. Generic data file
-o rmsdist_box2.xvg Output xvgr/xmgr file
-rms rmsdist.xpm Output, Opt. X PixMap compatible matrix file
-scl rmsscale.xpm Output, Opt. X PixMap compatible matrix file
-mean rmsmean.xpm Output, Opt. X PixMap compatible matrix file
-nmr3 nmr3.xpm Output, Opt. X PixMap compatible matrix file
-nmr6 nmr6.xpm Output, Opt. X PixMap compatible matrix file
-noe noe.dat Output, Opt. Generic data file

Option Type Value Description
------------------------------------------------------
h bool no Print help info and quit
-nice int 19 Set the nicelevel
-b time 0 First frame (ps) to read from trajectory
-e time 0 Last frame (ps) to read from trajectory
-dt time 0 Only use frame when t MOD dt = first time (ps)
[no]w bool no View output xvg, xpm, eps and pdb files
xvgr bool yes Add specific codes (legends etc.) in the output
xvg files for the xmgrace program
-nlevels int 40 Discretize rms in # levels
-max real -1 Maximum level in matrices
[no]sumh bool yes average distance over equivalent hydrogens

Opening library file /apps/gromacs4/share/gromacs/top/aminoacids.dat
Group 0 ( System) has 10 elements
Group 1 ( Protein) has 10 elements
Group 2 ( Protein-H) has 5 elements
Group 3 ( C-alpha) has 1 elements
Group 4 ( Backbone) has 3 elements
Group 5 ( MainChain) has 5 elements
Group 6 (MainChain+Cb) has 5 elements
Group 7 ( MainChain+H) has 8 elements
Group 8 ( SideChain) has 2 elements
Group 9 ( SideChain-H) has 0 elements
Select a group: 0
Selected 0: 'System'
Reading frames from gro file 'GLYCINE', 10 atoms.
Last frame 0 time 0.000

rmsmax = -1000, rmscmax = inf

gcq#12: "Being Great is Not So Good" (Red Hot Chili Peppers)

[extchees@axle TESTG_DISTRMSD]$ diff rmsdist_box1.xvg rmsdist_box2.xvg
1c1
< # This file was created Thu Sep 24 17:51:50 2009
---

  1. This file was created Thu Sep 24 17:51:59 2009

3c3
< # g_rmsdist f gly.gro -s gly_box1.gro -o rmsdist_box1
--

  1. g_rmsdist -f gly.gro -s gly_box2.gro -o rmsdist_box2

7c7
< # GROningen MAchine for Chemical Simulation
---

  1. Good gRace! Old Maple Actually Chews Slate

14c14
< 0 3.37796e-09
---

0 0.122408

[extchees@axle TESTG_DISTRMSD]$

TESTG_DISTRMSD.rar (1.36 KB) TESTG_DISTRMSD.rar Input and output files from bug test described above. Soeren Enemark, 09/24/2009 12:08 PM

History

#1 Updated by David van der Spoel over 9 years ago

Thank you for a comprehensive bug report. I reproduced your findings, however, this is a feature. Due to periodic boundary conditions distances may change, in your case the structure in gly.gro was periodiced iusing the box in the reference structure.

To prevent/work-around such issues I have implemented a -nopbc flag to the program.

Also available in: Atom PDF