Allow AWH geometry 'direction' to be periodic
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / grompp.cpp
index 2485d5a2e222325751ade6e26cf086dd1c903ca9..2a87cec0c4bf7200834943a65c7197fc494b99db 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.
@@ -2245,8 +2245,14 @@ int gmx_grompp(int argc, char *argv[])
 
     if (ir->bDoAwh)
     {
+        tensor compressibility = { { 0 } };
+        if (ir->epc != epcNO)
+        {
+            copy_mat(ir->compress, compressibility);
+        }
         setStateDependentAwhParams(ir->awhParams, ir->pull, pull,
-                                   state.box, ir->ePBC, &ir->opts, wi);
+                                   state.box, ir->ePBC, compressibility,
+                                   &ir->opts, wi);
     }
 
     if (ir->bPull)