Fix gmx wham with angle geometries
authorBerk Hess <hess@kth.se>
Mon, 10 Jun 2019 09:12:28 +0000 (11:12 +0200)
committerBerk Hess <hess@kth.se>
Mon, 10 Jun 2019 09:43:33 +0000 (11:43 +0200)
Fixes #2609

Change-Id: I36156e1d8bb98499e4357eadc4ca56384da433a5

docs/release-notes/2019/2019.3.rst
src/gromacs/gmxana/gmx_wham.cpp

index 43346d29bb8ecc5613fffb897e206004120a1a52..73754822c388be1269ac64331c1b2f9465ebefb8 100644 (file)
@@ -47,6 +47,14 @@ The formatting was incorrect for some tools that use PQR files.
 
 :issue:`2955`
 
+Fix gmx wham with angle geometries
+""""""""""""""""""""""""""""""""""
+
+gmx wham would mix up degree and radian units leading to no overlap
+or not-a-number output.
+
+:issue:`2609`
+
 Add some information for grompp error with wrong line endings
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
index 307a04485c79ac0b54dc09132505739f7da48084..2bcc8e145b53ec18e2370a6931a93beeb3676410 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -2050,7 +2050,8 @@ static void read_tpr_header(const char *fn, t_UmbrellaHeader* header, t_Umbrella
         header->pcrd[i].pull_type     = ir->pull->coord[i].eType;
         header->pcrd[i].geometry      = ir->pull->coord[i].eGeom;
         header->pcrd[i].ngroup        = ir->pull->coord[i].ngroup;
-        header->pcrd[i].k             = ir->pull->coord[i].k;
+        /* Angle type coordinates are handled fully in degrees in gmx wham */
+        header->pcrd[i].k             = ir->pull->coord[i].k*pull_conversion_factor_internal2userinput(&ir->pull->coord[i]);
         header->pcrd[i].init_dist     = ir->pull->coord[i].init;
 
         copy_ivec(ir->pull->coord[i].dim, header->pcrd[i].dim);