Merge "Merge branch release-2016"
[alexxy/gromacs.git] / src / gromacs / ewald / tests / pmegathertest.cpp
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 2016,2017, by the GROMACS development team, led by
5  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6  * and including many others, as listed in the AUTHORS file in the
7  * top-level source directory and at http://www.gromacs.org.
8  *
9  * GROMACS is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1
12  * of the License, or (at your option) any later version.
13  *
14  * GROMACS is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with GROMACS; if not, see
21  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23  *
24  * If you want to redistribute modifications to GROMACS, please
25  * consider that scientific software is very special. Version
26  * control is crucial - bugs must be traceable. We will be happy to
27  * consider code for inclusion in the official distribution, but
28  * derived work must not be called official GROMACS. Details are found
29  * in the README & COPYING files - if they are missing, get the
30  * official version at http://www.gromacs.org.
31  *
32  * To help us fund GROMACS development, we humbly ask that you cite
33  * the research papers on the package. Check out http://www.gromacs.org.
34  */
35 /*! \internal \file
36  * \brief
37  * Implements PME force gathering tests.
38  *
39  * \author Aleksei Iupinov <a.yupinov@gmail.com>
40  * \ingroup module_ewald
41  */
42
43 #include "gmxpre.h"
44
45 #include <string>
46
47 #include <gmock/gmock.h>
48
49 #include "gromacs/mdrunutility/mdmodules.h"
50 #include "gromacs/mdtypes/inputrec.h"
51 #include "gromacs/utility/stringutil.h"
52
53 #include "testutils/refdata.h"
54 #include "testutils/testasserts.h"
55
56 #include "pmetestcommon.h"
57
58 namespace gmx
59 {
60 namespace test
61 {
62 namespace
63 {
64
65 /* Valid input instances */
66
67 //! A couple of valid inputs for boxes.
68 static std::vector<Matrix3x3> const c_sampleBoxes
69 {
70     // normal box
71     Matrix3x3 {{
72                    8.0f, 0.0f, 0.0f,
73                    0.0f, 3.4f, 0.0f,
74                    0.0f, 0.0f, 2.0f
75                }},
76     // triclinic box
77     Matrix3x3 {{
78                    7.0f, 0.0f, 0.0f,
79                    0.0f, 4.1f, 0.0f,
80                    3.5f, 2.0f, 12.2f
81                }},
82 };
83
84 //! A couple of valid inputs for grid sizes
85 static std::vector<IVec> const c_sampleGridSizes
86 {
87     IVec {
88         16, 12, 14
89     },
90     IVec {
91         13, 15, 11
92     }
93 };
94 //! Random charges
95 static std::vector<real> const c_sampleChargesFull
96 {
97     4.95f, 3.11f, 3.97f, 1.08f, 2.09f, 1.1f, 4.13f, 3.31f, 2.8f, 5.83f, 5.09f, 6.1f, 2.86f, 0.24f, 5.76f, 5.19f, 0.72f
98 };
99
100 //! All the input atom gridline indices
101 static std::vector<IVec> const c_sampleGridLineIndicesFull
102 {
103     IVec {
104         4, 2, 6
105     },
106     IVec {
107         1, 4, 10
108     },
109     IVec {
110         0, 6, 6
111     },
112     IVec {
113         0, 1, 4
114     },
115     IVec {
116         6, 3, 0
117     },
118     IVec {
119         7, 2, 2
120     },
121     IVec {
122         8, 3, 1
123     },
124     IVec {
125         4, 0, 3
126     },
127     IVec {
128         0, 0, 0
129     },
130     IVec {
131         8, 5, 8
132     },
133     IVec {
134         4, 4, 2
135     },
136     IVec {
137         7, 1, 7
138     },
139     IVec {
140         8, 5, 5
141     },
142     IVec {
143         2, 6, 5
144     },
145     IVec {
146         1, 6, 2
147     },
148     IVec {
149         7, 1, 8
150     },
151     IVec {
152         3, 5, 1
153     },
154 };
155
156 // Spline values/derivatives below are also generated randomly, so they are bogus,
157 // but that should not affect the reproducibility, which we're after
158
159 //! A lot of bogus input spline values - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values
160 static std::vector<real> const c_sampleSplineValuesFull
161 {
162     0.12f, 0.81f, 0.29f, 0.22f, 0.13f, 0.19f, 0.12f, 0.8f, 0.44f, 0.38f, 0.32f, 0.36f, 0.27f, 0.11f, 0.17f, 0.94f, 0.07f, 0.9f, 0.98f, 0.96f, 0.07f, 0.94f, 0.77f, 0.24f, 0.84f, 0.16f, 0.77f, 0.57f, 0.52f, 0.27f, 0.39f, 0.45f, 0.6f, 0.59f, 0.44f, 0.91f, 0.97f, 0.43f, 0.24f, 0.52f, 0.73f, 0.55f, 0.99f, 0.39f, 0.97f, 0.35f, 0.1f, 0.68f, 0.19f, 0.1f, 0.77f, 0.2f, 0.43f, 0.69f, 0.76f, 0.32f, 0.31f, 0.94f, 0.53f, 0.6f, 0.93f, 0.57f, 0.94f, 0.88f, 0.75f, 0.77f, 0.91f, 0.72f, 0.07f, 0.78f, 0.09f, 0.02f, 0.48f, 0.97f, 0.89f, 0.39f, 0.48f, 0.19f, 0.02f, 0.92f, 0.8f, 0.41f, 0.53f, 0.32f, 0.38f, 0.58f, 0.36f, 0.46f, 0.92f, 0.91f, 0.01f, 0.86f, 0.54f, 0.86f, 0.94f, 0.37f, 0.35f, 0.81f, 0.89f, 0.48f,
163     0.34f, 0.18f, 0.11f, 0.02f, 0.87f, 0.95f, 0.66f, 0.67f, 0.38f, 0.45f, 0.04f, 0.94f, 0.54f, 0.76f, 0.58f, 0.83f, 0.31f, 0.73f, 0.71f, 0.06f, 0.35f, 0.32f, 0.35f, 0.61f, 0.27f, 0.98f, 0.83f, 0.11f, 0.3f, 0.42f, 0.95f, 0.69f, 0.58f, 0.29f, 0.1f, 0.68f, 0.94f, 0.62f, 0.51f, 0.47f, 0.04f, 0.47f, 0.34f, 0.71f, 0.52f, 0.19f, 0.69f, 0.5f, 0.59f, 0.05f, 0.74f, 0.11f, 0.4f, 0.81f, 0.24f, 0.53f, 0.71f, 0.07f, 0.17f, 0.41f, 0.23f, 0.78f, 0.27f, 0.1f, 0.71f, 0.36f, 0.67f, 0.6f, 0.94f, 0.69f, 0.19f, 0.58f, 0.68f, 0.5f, 0.62f, 0.38f, 0.29f, 0.44f, 0.04f, 0.89f, 0.0f, 0.76f, 0.22f, 0.16f, 0.08f, 0.62f, 0.51f, 0.62f, 0.83f, 0.72f, 0.96f, 0.99f, 0.4f, 0.79f, 0.83f, 0.21f, 0.43f, 0.32f, 0.44f, 0.72f,
164     0.21f, 0.4f, 0.93f, 0.07f, 0.11f, 0.41f, 0.24f, 0.04f, 0.36f, 0.15f, 0.92f, 0.08f, 0.99f, 0.35f, 0.42f, 0.7f, 0.17f, 0.39f, 0.69f, 0.0f, 0.86f, 0.89f, 0.59f, 0.81f, 0.77f, 0.15f, 0.89f, 0.17f, 0.76f, 0.67f, 0.58f, 0.78f, 0.26f, 0.19f, 0.69f, 0.18f, 0.46f, 0.6f, 0.69f, 0.23f, 0.34f, 0.3f, 0.64f, 0.34f, 0.6f, 0.99f, 0.69f, 0.57f, 0.75f, 0.07f, 0.36f, 0.75f, 0.81f, 0.8f, 0.42f, 0.09f, 0.94f, 0.66f, 0.35f, 0.67f, 0.34f, 0.66f, 0.02f, 0.47f, 0.78f, 0.21f, 0.02f, 0.18f, 0.42f, 0.2f, 0.46f, 0.34f, 0.4f, 0.46f, 0.96f, 0.86f, 0.25f, 0.25f, 0.22f, 0.37f, 0.59f, 0.19f, 0.45f, 0.61f, 0.04f, 0.71f, 0.77f, 0.51f, 0.77f, 0.15f, 0.78f, 0.36f, 0.62f, 0.24f, 0.86f, 0.2f, 0.77f, 0.08f, 0.09f, 0.3f,
165     0.0f, 0.6f, 0.99f, 0.69f,
166 };
167
168 //! A lot of bogus input spline derivatives - should have at list (max PME order = 5) * (DIM = 3) * (total unique atom number in all test cases = 16) values
169 static std::vector<real> const c_sampleSplineDerivativesFull
170 {
171     0.82f, 0.88f, 0.83f, 0.11f, 0.93f, 0.32f, 0.71f, 0.37f, 0.69f, 0.88f, 0.11f, 0.38f, 0.25f, 0.5f, 0.36f, 0.81f, 0.78f, 0.31f, 0.66f, 0.32f, 0.27f, 0.35f, 0.53f, 0.83f, 0.08f, 0.08f, 0.94f, 0.71f, 0.65f, 0.24f, 0.13f, 0.01f, 0.33f, 0.65f, 0.24f, 0.53f, 0.45f, 0.84f, 0.33f, 0.97f, 0.31f, 0.7f, 0.03f, 0.31f, 0.41f, 0.76f, 0.12f, 0.3f, 0.57f, 0.65f, 0.87f, 0.99f, 0.42f, 0.97f, 0.32f, 0.39f, 0.73f, 0.23f, 0.03f, 0.67f, 0.97f, 0.57f, 0.42f, 0.38f, 0.54f, 0.17f, 0.53f, 0.54f, 0.18f, 0.8f, 0.76f, 0.13f, 0.29f, 0.83f, 0.77f, 0.56f, 0.4f, 0.87f, 0.36f, 0.18f, 0.59f, 0.04f, 0.05f, 0.61f, 0.26f, 0.91f, 0.62f, 0.16f, 0.89f, 0.23f, 0.26f, 0.59f, 0.33f, 0.2f, 0.49f, 0.41f, 0.25f, 0.4f, 0.16f, 0.83f,
172     0.44f, 0.82f, 0.21f, 0.95f, 0.14f, 0.8f, 0.37f, 0.31f, 0.41f, 0.53f, 0.15f, 0.85f, 0.78f, 0.17f, 0.92f, 0.03f, 0.13f, 0.2f, 0.03f, 0.33f, 0.87f, 0.38f, 0, 0.08f, 0.79f, 0.36f, 0.53f, 0.05f, 0.07f, 0.94f, 0.23f, 0.85f, 0.13f, 0.27f, 0.23f, 0.22f, 0.26f, 0.38f, 0.15f, 0.48f, 0.18f, 0.33f, 0.23f, 0.62f, 0.1f, 0.36f, 0.99f, 0.07f, 0.02f, 0.04f, 0.09f, 0.29f, 0.52f, 0.29f, 0.83f, 0.97f, 0.61f, 0.81f, 0.49f, 0.56f, 0.08f, 0.09f, 0.03f, 0.65f, 0.46f, 0.1f, 0.06f, 0.06f, 0.39f, 0.29f, 0.04f, 0.03f, 0.1f, 0.83f, 0.94f, 0.59f, 0.97f, 0.82f, 0.2f, 0.66f, 0.23f, 0.11f, 0.03f, 0.16f, 0.27f, 0.53f, 0.94f, 0.46f, 0.43f, 0.29f, 0.97f, 0.64f, 0.46f, 0.37f, 0.43f, 0.48f, 0.37f, 0.93f, 0.5f, 0.2f,
173     0.92f, 0.09f, 0.74f, 0.55f, 0.44f, 0.05f, 0.13f, 0.17f, 0.79f, 0.44f, 0.11f, 0.6f, 0.64f, 0.05f, 0.96f, 0.3f, 0.45f, 0.47f, 0.42f, 0.74f, 0.91f, 0.06f, 0.89f, 0.24f, 0.26f, 0.68f, 0.4f, 0.88f, 0.5f, 0.65f, 0.48f, 0.15f, 0.0f, 0.41f, 0.67f, 0.4f, 0.31f, 0.73f, 0.77f, 0.36f, 0.26f, 0.74f, 0.46f, 0.56f, 0.78f, 0.92f, 0.32f, 0.9f, 0.06f, 0.55f, 0.6f, 0.13f, 0.38f, 0.93f, 0.5f, 0.92f, 0.96f, 0.82f, 0.0f, 0.04f, 0.9f, 0.55f, 0.97f, 1.0f, 0.23f, 0.46f, 0.52f, 0.49f, 0.0f, 0.32f, 0.16f, 0.4f, 0.62f, 0.36f, 0.03f, 0.63f, 0.16f, 0.58f, 0.97f, 0.03f, 0.44f, 0.07f, 0.22f, 0.75f, 0.32f, 0.61f, 0.94f, 0.33f, 0.7f, 0.57f, 0.5f, 0.84f, 0.7f, 0.47f, 0.18f, 0.09f, 0.25f, 0.77f, 0.94f, 0.85f,
174     0.09f, 0.83f, 0.02f, 0.91f,
175 };
176
177 //! 2 c_sample grids - only non-zero values have to be listed
178 static std::vector<SparseRealGridValuesInput> const c_sampleGrids
179 {
180     SparseRealGridValuesInput {{
181                                    IVec {
182                                        0, 0, 0
183                                    }, 3.5f
184                                }, {
185                                    IVec {
186                                        7, 0, 0
187                                    }, -2.5f
188                                },
189                                {
190                                    IVec {
191                                        3, 5, 7
192                                    }, -0.006f
193                                }, {
194                                    IVec {
195                                        1, 6, 7
196                                    }, -2.76f
197                                }, {
198                                    IVec {
199                                        3, 1, 2
200                                    }, 0.6f
201                                },  {
202                                    IVec {
203                                        6, 2, 4
204                                    }, 7.1f
205                                }, {
206                                    IVec {
207                                        4, 5, 6
208                                    }, 4.1f
209                                }, {
210                                    IVec {
211                                        4, 4, 6
212                                    }, -3.7f
213                                }, },
214     SparseRealGridValuesInput {{
215                                    IVec {
216                                        0, 4, 0
217                                    }, 6.f
218                                }, {
219                                    IVec {
220                                        4, 2, 7
221                                    }, 13.76f
222                                }, {
223                                    IVec {
224                                        0, 6, 7
225                                    }, 3.6f
226                                }, {
227                                    IVec {
228                                        3, 2, 8
229                                    }, 0.61f
230                                },
231                                {
232                                    IVec {
233                                        5, 4, 3
234                                    }, 2.1f
235                                },
236                                {
237                                    IVec {
238                                        2, 5, 10
239                                    }, 3.6f
240                                }, {
241                                    IVec {
242                                        5, 3, 6
243                                    }, 2.1f
244                                }, {
245                                    IVec {
246                                        6, 6, 6
247                                    }, 6.1f
248                                }, }
249 };
250
251 //! Input forces for reduction
252 static std::vector<RVec> const c_sampleForcesFull {
253     RVec {
254         0.02f, 0.87f, 0.95f
255     }, RVec {
256         0.66f, 0.67f, 0.38f
257     }, RVec {
258         0.45f, 0.04f, 0.94f
259     }, RVec {
260         0.54f, 0.76f, 0.58f
261     },
262     RVec {
263         0.83f, 0.31f, 0.73f
264     }, RVec {
265         0.71f, 0.06f, 0.35f
266     }, RVec {
267         0.32f, 0.35f, 0.61f
268     }, RVec {
269         0.27f, 0.98f, 0.83f
270     },
271     RVec {
272         0.11f, 0.3f, 0.42f
273     }, RVec {
274         0.95f, 0.69f, 0.58f
275     }, RVec {
276         0.29f, 0.1f, 0.68f
277     }, RVec {
278         0.94f, 0.62f, 0.51f
279     },
280     RVec {
281         0.47f, 0.04f, 0.47f
282     }, RVec {
283         0.34f, 0.71f, 0.52f
284     }
285 };
286
287 //! PME orders to test
288 static std::vector<int> const pmeOrders {
289     3, 4, 5
290 };
291 //! Atom counts to test
292 static std::vector<size_t> const atomCounts {
293     1, 2, 13
294 };
295
296 /* Helper structures for test input */
297
298 //! A structure for all the spline data which depends in size both on the PME order and atom count
299 struct AtomAndPmeOrderSizedData
300 {
301     //! Spline values
302     SplineParamsVector splineValues;
303     //! Spline derivatives
304     SplineParamsVector splineDerivatives;
305 };
306
307 //! A structure for all the input atom data which depends in size on atom count - including a range of spline data for different PME orders
308 struct AtomSizedData
309 {
310     //! Gridline indices
311     GridLineIndicesVector                   gridLineIndices;
312     //! Charges
313     ChargesVector                           charges;
314     //! Coordinates
315     CoordinatesVector                       coordinates;
316     //! Spline data for different orders
317     std::map<int, AtomAndPmeOrderSizedData> splineDataByPmeOrder;
318 };
319
320 //! A range of the test input data sets, uniquely identified by the atom count
321 typedef std::map<size_t, AtomSizedData> InputDataByAtomCount;
322
323 /*! \brief Convenience typedef of the test input parameters - unit cell box, PME interpolation order, grid dimensions,
324  *  grid values, overwriting/reducing the input forces, atom count.
325  *
326  * The rest of the atom-related input data - gridline indices, spline theta values, spline dtheta values, atom charges -
327  * is looked up in the inputAtomDataSets_ test fixture variable.
328  */
329 typedef std::tuple<Matrix3x3, int, IVec, SparseRealGridValuesInput, PmeGatherInputHandling, size_t> GatherInputParameters;
330
331 //! Test fixture
332 class PmeGatherTest : public ::testing::TestWithParam<GatherInputParameters>
333 {
334     private:
335         //! Environment for getting the t_inputrec structure easily
336         MDModules mdModules_;
337
338         //! Storage of all the input atom datasets
339         static InputDataByAtomCount s_inputAtomDataSets_;
340
341     public:
342         //! Default constructor
343         PmeGatherTest()  = default;
344         //! Sets the input atom data references once
345         static void SetUpTestCase()
346         {
347             auto                gridLineIndicesIt = c_sampleGridLineIndicesFull.begin();
348             auto                chargesIt         = c_sampleChargesFull.begin();
349             for (auto atomCount : atomCounts)
350             {
351                 AtomSizedData atomData;
352                 atomData.gridLineIndices = GridLineIndicesVector::fromVector(gridLineIndicesIt, gridLineIndicesIt + atomCount);
353                 gridLineIndicesIt       += atomCount;
354                 atomData.charges         = ChargesVector::fromVector(chargesIt, chargesIt + atomCount);
355                 chargesIt               += atomCount;
356                 atomData.coordinates.resize(atomCount, RVec {1e6, 1e7, -1e8});
357                 /* The coordinates are intentionally bogus in this test - only the size matters; the gridline indices are fed directly as inputs */
358                 for (auto pmeOrder : pmeOrders)
359                 {
360                     AtomAndPmeOrderSizedData splineData;
361                     const size_t             dimSize = atomCount * pmeOrder;
362                     for (int dimIndex = 0; dimIndex < DIM; dimIndex++)
363                     {
364                         splineData.splineValues[dimIndex] = SplineParamsDimVector::fromVector(c_sampleSplineValuesFull.begin() + dimIndex * dimSize,
365                                                                                               c_sampleSplineValuesFull.begin() + (dimIndex + 1) * dimSize);
366                         splineData.splineDerivatives[dimIndex] = SplineParamsDimVector::fromVector(c_sampleSplineDerivativesFull.begin() + dimIndex * dimSize,
367                                                                                                    c_sampleSplineDerivativesFull.begin() + (dimIndex + 1) * dimSize);
368                     }
369                     atomData.splineDataByPmeOrder[pmeOrder] = splineData;
370                 }
371                 s_inputAtomDataSets_[atomCount] = atomData;
372             }
373         }
374         //! The test
375         void runTest()
376         {
377             /* Getting the input */
378             Matrix3x3                 box;
379             int                       pmeOrder;
380             IVec                      gridSize;
381             size_t                    atomCount;
382             SparseRealGridValuesInput nonZeroGridValues;
383             PmeGatherInputHandling    inputForceTreatment;
384             std::tie(box, pmeOrder, gridSize, nonZeroGridValues, inputForceTreatment, atomCount) = GetParam();
385             auto inputAtomData       = s_inputAtomDataSets_[atomCount];
386             auto inputAtomSplineData = inputAtomData.splineDataByPmeOrder[pmeOrder];
387
388             /* Storing the input where it's needed, running the test */
389             t_inputrec *inputRec  = mdModules_.inputrec();
390             inputRec->nkx         = gridSize[XX];
391             inputRec->nky         = gridSize[YY];
392             inputRec->nkz         = gridSize[ZZ];
393             inputRec->pme_order   = pmeOrder;
394             inputRec->coulombtype = eelPME;
395
396             TestReferenceData                     refData;
397             const std::map<CodePath, std::string> modesToTest = {{CodePath::CPU, "CPU"}};
398             for (const auto &mode : modesToTest)
399             {
400                 /* Describing the test uniquely */
401                 SCOPED_TRACE(formatString("Testing force gathering with %s for PME grid size %d %d %d"
402                                           ", order %d, %zu atoms, %s",
403                                           mode.second.c_str(),
404                                           gridSize[XX], gridSize[YY], gridSize[ZZ],
405                                           pmeOrder,
406                                           atomCount,
407                                           (inputForceTreatment == PmeGatherInputHandling::ReduceWith) ? "with reduction" : "without reduction"
408                                           ));
409
410                 PmeSafePointer pmeSafe = pmeInitWithAtoms(inputRec, inputAtomData.coordinates, inputAtomData.charges, box);
411
412                 /* Setting some more inputs */
413                 pmeSetRealGrid(pmeSafe.get(), mode.first, nonZeroGridValues);
414
415                 pmeSetGridLineIndices(pmeSafe.get(), mode.first, inputAtomData.gridLineIndices);
416
417                 for (int dimIndex = 0; dimIndex < DIM; dimIndex++)
418                 {
419                     pmeSetSplineData(pmeSafe.get(), mode.first, inputAtomSplineData.splineValues[dimIndex], PmeSplineDataType::Values, dimIndex);
420                     pmeSetSplineData(pmeSafe.get(), mode.first, inputAtomSplineData.splineDerivatives[dimIndex], PmeSplineDataType::Derivatives, dimIndex);
421                 }
422
423                 /* Explicitly copying the c_sample forces to be able to modify them */
424                 auto inputForcesFull(c_sampleForcesFull);
425                 GMX_RELEASE_ASSERT(inputForcesFull.size() >= atomCount, "Bad input forces size");
426                 auto forces = ForcesVector::fromVector(inputForcesFull.begin(), inputForcesFull.begin() + atomCount);
427
428                 /* Running the force gathering itself */
429                 pmePerformGather(pmeSafe.get(), mode.first, inputForceTreatment, forces);
430
431                 /* Check the output forces correctness */
432                 TestReferenceChecker forceChecker(refData.rootChecker());
433                 const auto           ulpTolerance = 3 * pmeOrder;
434                 forceChecker.setDefaultTolerance(relativeToleranceAsUlp(1.0, ulpTolerance));
435                 forceChecker.checkSequence(forces.begin(), forces.end(), "Forces");
436             }
437         }
438 };
439
440 // An instance of static atom data
441 InputDataByAtomCount PmeGatherTest::s_inputAtomDataSets_;
442
443 //! Test for PME force gathering
444 TEST_P(PmeGatherTest, ReproducesOutputs)
445 {
446     EXPECT_NO_THROW(runTest());
447 }
448
449 //! Instantiation of the PME gathering test
450 INSTANTIATE_TEST_CASE_P(SaneInput, PmeGatherTest, ::testing::Combine(::testing::ValuesIn(c_sampleBoxes),
451                                                                          ::testing::ValuesIn(pmeOrders),
452                                                                          ::testing::ValuesIn(c_sampleGridSizes),
453                                                                          ::testing::ValuesIn(c_sampleGrids),
454                                                                          ::testing::Values(PmeGatherInputHandling::Overwrite, PmeGatherInputHandling::ReduceWith),
455                                                                          ::testing::ValuesIn(atomCounts)));
456
457 }
458 }
459 }