From 90abdcf9a41e447da7f4e66baba23caf3e10d461 Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Thu, 7 Mar 2013 19:26:23 +0100 Subject: [PATCH] Fixes #1183 PBC bug in g_mindist Fixes minimum size of the box if triclinic when checking the periodic image distance. Change-Id: I54cb593c42f791b6540147233c345069f84e2f33 --- src/tools/gmx_mindist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/gmx_mindist.c b/src/tools/gmx_mindist.c index f306294272..dc9ae1f74f 100644 --- a/src/tools/gmx_mindist.c +++ b/src/tools/gmx_mindist.c @@ -65,7 +65,7 @@ static void periodic_dist(matrix box,rvec x[],int n,atom_id index[], real sqr_box,r2min,r2max,r2; rvec shift[NSHIFT],d0,d; - sqr_box = sqr(min(box[XX][XX],min(box[YY][YY],box[ZZ][ZZ]))); + sqr_box = sqr(min(norm(box[XX]),min(norm(box[YY]),norm(box[ZZ])))); s = 0; for(sz=-1; sz<=1; sz++) -- 2.11.4.GIT