Project

General

Profile

Bug #1698

g_density -center shifts coordinates in the wrong direction

Added by Chris Neale over 2 years ago. Updated about 2 years ago.

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

Description

in gmx_density.c
in the function center_coords
at line 162 in version 5.0.4
the following code:
rvec_sub(box_center, com, shift);

should be replaced with:
rvec_sub(com, box_center, shift);

otherwise the shifting is incorrect.

To verify, take any system, generate the density profile using g_density option -center, then use trjconv to shift the system 1 nm along z and run g_density -center again. Instead of getting the same result as before, you get a result that is shifted by 2 nm (2 nm because 1 nm for your shift and an extra nm because the shift is corrected in the wrong direction).

Thank you,
Chris.

Associated revisions

Revision 3e9a0a12 (diff)
Added by Erik Lindahl about 2 years ago

Fix incorrect shift with g_density -center

Fixes #1698.

Change-Id: I22be246eded9c1fc6f421f14eb3938584afed0de

History

#1 Updated by Gerrit Code Review Bot about 2 years ago

Gerrit received a related patchset '1' for Issue #1698.
Uploader: Erik Lindahl ()
Change-Id: I22be246eded9c1fc6f421f14eb3938584afed0de
Gerrit URL: https://gerrit.gromacs.org/4724

#2 Updated by Erik Lindahl about 2 years ago

  • Status changed from New to Fix uploaded

#3 Updated by Rossen Apostolov about 2 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF