1 // ******************************************************************************
2 //
3 // Title: Force Field X.
4 // Description: Force Field X - Software for Molecular Biophysics.
5 // Copyright: Copyright (c) Michael J. Schnieders 2001-2025.
6 //
7 // This file is part of Force Field X.
8 //
9 // Force Field X is free software; you can redistribute it and/or modify it
10 // under the terms of the GNU General Public License version 3 as published by
11 // the Free Software Foundation.
12 //
13 // Force Field X is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 // details.
17 //
18 // You should have received a copy of the GNU General Public License along with
19 // Force Field X; if not, write to the Free Software Foundation, Inc., 59 Temple
20 // Place, Suite 330, Boston, MA 02111-1307 USA
21 //
22 // Linking this library statically or dynamically with other modules is making a
23 // combined work based on this library. Thus, the terms and conditions of the
24 // GNU General Public License cover the whole combination.
25 //
26 // As a special exception, the copyright holders of this library give you
27 // permission to link this library with independent modules to produce an
28 // executable, regardless of the license terms of these independent modules, and
29 // to copy and distribute the resulting executable under terms of your choice,
30 // provided that you also meet, for each linked independent module, the terms
31 // and conditions of the license of that module. An independent module is a
32 // module which is not derived from or based on this library. If you modify this
33 // library, you may extend this exception to your version of the library, but
34 // you are not obligated to do so. If you do not wish to do so, delete this
35 // exception statement from your version.
36 //
37 // ******************************************************************************
38 package ffx.potential.commands;
39
40 import org.junit.runner.RunWith;
41 import org.junit.runners.Parameterized;
42 import org.junit.runners.Parameterized.Parameters;
43
44 import java.util.Arrays;
45 import java.util.Collection;
46
47 /**
48 * Test the Energy script with Generalized Kirkwood parameters.
49 */
50 @RunWith(Parameterized.class)
51 public class GKEnergyTest extends ParentEnergyTest {
52
53 public GKEnergyTest(String info, String filename, int nAtoms, double bondEnergy, int nBonds,
54 double angleEnergy, int nAngles, double stretchBendEnergy, int nStretchBends,
55 double ureyBradleyEnergy, int nUreyBradleys, double outOfPlaneBendEnergy,
56 int nOutOfPlaneBends, double torsionEnergy, int nTorsions, double improperTorsionEnergy,
57 int nImproperTorsions, double piOrbitalTorsionEnergy, int nPiOrbitalTorsions,
58 double torsionTorsionEnergy, int nTorsionTorsions, double stretchTorsionEnergy,
59 int nStretchTorsions, double angleTorsionEnergy, int nAngleTorsions, double vanDerWaalsEnergy,
60 int nVanDerWaals, double permanentEnergy, int nPermanent, double polarizationEnergy,
61 int nPolar, double gkEnergy, int nGK, boolean testOpenMM) {
62 super(info, filename, nAtoms, bondEnergy, nBonds, angleEnergy, nAngles, stretchBendEnergy, nStretchBends,
63 ureyBradleyEnergy, nUreyBradleys, outOfPlaneBendEnergy, nOutOfPlaneBends, torsionEnergy,
64 nTorsions, improperTorsionEnergy, nImproperTorsions, piOrbitalTorsionEnergy,
65 nPiOrbitalTorsions, torsionTorsionEnergy, nTorsionTorsions, stretchTorsionEnergy,
66 nStretchTorsions, angleTorsionEnergy, nAngleTorsions, vanDerWaalsEnergy, nVanDerWaals,
67 permanentEnergy, nPermanent, polarizationEnergy, nPolar, gkEnergy, nGK, testOpenMM);
68 }
69
70 @Parameters
71 public static Collection<Object[]> data() {
72 return Arrays.asList(
73 new Object[][]{
74 /*
75 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
76 * published values (Corrigan et al. 2023) due to small multipole updates to the
77 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
78 *
79 * The error magnitude is <2 kcal for each term
80 */
81 {
82 "RNA (1mis) with GK from Corrigan et al (2023)",
83 "1mis.xyz",
84 522, // Atoms
85 60.88950457, // Bond
86 562,
87 136.35249695, // Angle
88 998,
89 2.43194433, // Stretch-Bend
90 848,
91 0.0, // Urey-Bradley
92 0,
93 0.10282386, // Out-of-Plane
94 294,
95 79.48824698, // Torsion
96 1492,
97 0.0, // Improper Torsion
98 0,
99 0.45934575, // Pi-Orbital Torsion
100 96,
101 0.0, // Torsion-Torsion
102 0,
103 -3.02691282, // Stretch-Torsion
104 44,
105 -4.54420615, // Angle-Torsion
106 72,
107 218.31775844, // vdW
108 134421,
109 875.03795766, // Permanent
110 134421,
111 -238.72680230, // Polarization
112 134421,
113 -3236.93867799, // Total Solvation
114 // Generalized Kirkwood -3221.37466819
115 // Cavitation 272.96015049, Dispersion -288.52416028
116 136503,
117 false
118 },
119 {
120 "RNA (1mis) with GK from Corrigan et al (2021)",
121 "1mis.gk2021.xyz",
122 522, // Atoms
123 60.88950457, // Bond
124 562,
125 136.35249695, // Angle
126 998,
127 2.43194433, // Stretch-Bend
128 848,
129 0.0, // Urey-Bradley
130 0,
131 0.10282386, // Out-of-Plane
132 294,
133 79.48824698, // Torsion
134 1492,
135 0.0, // Improper Torsion
136 0,
137 0.45934575, // Pi-Orbital Torsion
138 96,
139 0.0, // Torsion-Torsion
140 0,
141 -3.02691282, // Stretch-Torsion
142 44,
143 -4.54420615, // Angle-Torsion
144 72,
145 218.31775844, // vdW
146 134421,
147 875.03795766, // Permanent
148 134421,
149 -238.72700000, // Polarization
150 134421,
151 -3308.29464032, // Total Solvation
152 136503,
153 false
154 // Generalized Kirkwood -3308.29466860 0.032
155 // Total Potential -2181.51251119 (Kcal/mole) 1.155 (sec)
156 },
157 /*
158 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
159 * published values (Corrigan et. al. 2023) due to small multipole updates to the
160 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
161 *
162 * The error magnitude is <2 kcal for each term
163 */
164 {
165 "Protein (1bpi) with GK from Corrigan et al (2023)",
166 "1bpi.xyz",
167 892, // Atoms
168 281.75870048, // Bond
169 906,
170 235.11731039, // Angle
171 1626,
172 -12.11600646, // Stretch-Bend
173 1455,
174 0.0, // Urey-Bradley
175 0,
176 28.91012526, // Out-of-Plane
177 597,
178 69.15283653, // Torsion
179 2391,
180 0.0, // Improper Torsion
181 0,
182 27.49698981, // Pi-Orbital Torsion
183 109,
184 -36.43950083, // Torsion-Torsion
185 6,
186 0.0, // Stretch-Torsion
187 0,
188 0.0, // Angle-Torsion
189 0,
190 470.1728659015, // vdW
191 394854,
192 -1189.88505475, // Permanent
193 394854,
194 -242.15918841, // Polarization
195 394854,
196 -923.17087281, // Total Solvation
197 //Generalized Kirkwood -970.64995804
198 //Cavitation 444.79997963, Dispersion -397.32089439
199 398278,
200 false
201 },
202 /*
203 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
204 * published values (Corrigan et. al. 2023) due to small multipole updates to the
205 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
206 *
207 * The error magnitude is <2 kcal for each term
208 */
209 {
210 "Protein (1bpi) with GK from Corrigan et al (2023) - No Neck",
211 "1bpi.noneck.xyz",
212 892, // Atoms
213 281.75870048, // Bond
214 906,
215 235.11731039, // Angle
216 1626,
217 -12.11600646, // Stretch-Bend
218 1455,
219 0.0, // Urey-Bradley
220 0,
221 28.91012526, // Out-of-Plane
222 597,
223 69.15283653, // Torsion
224 2391,
225 0.0, // Improper Torsion
226 0,
227 27.49698981, // Pi-Orbital Torsion
228 109,
229 -36.43950083, // Torsion-Torsion
230 6,
231 0.0, // Stretch-Torsion
232 0,
233 0.0, // Angle-Torsion
234 0,
235 470.1728659015, // vdW
236 394854,
237 -1189.88505475, // Permanent
238 394854,
239 -242.15918841, // Polarization
240 394854,
241 -900.45662762, // Total Solvation
242 //Generalized Kirkwood -947.93571285
243 //Cavitation 444.79997963, Dispersion -397.32089439
244 398278,
245 false
246 },
247 /*
248 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
249 * published values (Corrigan et. al. 2023) due to small multipole updates to the
250 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
251 *
252 * The error magnitude is <2 kcal for each term
253 */
254 {
255 "Protein (1bpi) with GK from Corrigan et al (2023) - No Tanh",
256 "1bpi.notanh.xyz",
257 892, // Atoms
258 281.75870048, // Bond
259 906,
260 235.11731039, // Angle
261 1626,
262 -12.11600646, // Stretch-Bend
263 1455,
264 0.0, // Urey-Bradley
265 0,
266 28.91012526, // Out-of-Plane
267 597,
268 69.15283653, // Torsion
269 2391,
270 0.0, // Improper Torsion
271 0,
272 27.49698981, // Pi-Orbital Torsion
273 109,
274 -36.43950083, // Torsion-Torsion
275 6,
276 0.0, // Stretch-Torsion
277 0,
278 0.0, // Angle-Torsion
279 0,
280 470.1728659015, // vdW
281 394854,
282 -1189.88505475, // Permanent
283 394854,
284 -242.15918841, // Polarization
285 394854,
286 -1241.80712005, // Total Solvation
287 //Generalized Kirkwood -1289.28620528
288 //Cavitation 444.79997963, Dispersion -397.32089439
289 398278,
290 false
291 },
292 /*
293 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
294 * published values (Corrigan et. al. 2023) due to small multipole updates to the
295 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
296 *
297 * The error magnitude is <2 kcal for each term
298 */
299 {
300 "Protein (1bpi) with GK from Corrigan et al (2023) - No Neck, No Tanh",
301 "1bpi.noneck.notanh.xyz",
302 892, // Atoms
303 281.75870048, // Bond
304 906,
305 235.11731039, // Angle
306 1626,
307 -12.11600646, // Stretch-Bend
308 1455,
309 0.0, // Urey-Bradley
310 0,
311 28.91012526, // Out-of-Plane
312 597,
313 69.15283653, // Torsion
314 2391,
315 0.0, // Improper Torsion
316 0,
317 27.49698981, // Pi-Orbital Torsion
318 109,
319 -36.43950083, // Torsion-Torsion
320 6,
321 0.0, // Stretch-Torsion
322 0,
323 0.0, // Angle-Torsion
324 0,
325 470.1728659015, // vdW
326 394854,
327 -1189.88505475, // Permanent
328 394854,
329 -242.15918841, // Polarization
330 394854,
331 -1325.30614458, // Total Solvation
332 //Generalized Kirkwood -1372.78522981
333 //Cavitation 444.79997963, Dispersion -397.32089439
334 398278,
335 false
336 },
337 /*
338 * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
339 * published values (Corrigan et. al. 2023) due to small multipole updates to the
340 * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
341 *
342 * The error magnitude is <2 kcal for each term
343 */
344 {
345 "Protein (1bpi) with GK from Corrigan et al (2023) - No Element HCT or Interstitial Space Corrections",
346 "1bpi.noelemhct.xyz",
347 892, // Atoms
348 281.75870048, // Bond
349 906,
350 235.11731039, // Angle
351 1626,
352 -12.11600646, // Stretch-Bend
353 1455,
354 0.0, // Urey-Bradley
355 0,
356 28.91012526, // Out-of-Plane
357 597,
358 69.15283653, // Torsion
359 2391,
360 0.0, // Improper Torsion
361 0,
362 27.49698981, // Pi-Orbital Torsion
363 109,
364 -36.43950083, // Torsion-Torsion
365 6,
366 0.0, // Stretch-Torsion
367 0,
368 0.0, // Angle-Torsion
369 0,
370 470.1728659015, // vdW
371 394854,
372 -1189.88505475, // Permanent
373 394854,
374 -242.15918841, // Polarization
375 394854,
376 -1330.12099084, // Total Solvation
377 //Generalized Kirkwood -1377.60007607
378 //Cavitation 444.79997963, Dispersion -397.32089439
379 398278,
380 false
381 },
382 {
383 "Protein (1bpi) with GK from Corrigan et al (2021)",
384 "1bpi.gk2021.xyz",
385 892, // Atoms
386 281.75870048, // Bond
387 906,
388 235.11731039, // Angle
389 1626,
390 -12.11600646, // Stretch-Bend
391 1455,
392 0.0, // Urey-Bradley
393 0,
394 28.91012526, // Out-of-Plane
395 597,
396 69.15283653, // Torsion
397 2391,
398 0.0, // Improper Torsion
399 0,
400 27.49698981, // Pi-Orbital Torsion
401 109,
402 -36.43950083, // Torsion-Torsion
403 6,
404 0.0, // Stretch-Torsion
405 0,
406 0.0, // Angle-Torsion
407 0,
408 470.1728659015, // vdW
409 394854,
410 -1189.885054752826, // Permanent
411 394854,
412 -242.15918841434635, // Polarization
413 394854,
414 -1166.1124974225615, // Total Solvation
415 398278,
416 false
417 }
418
419 });
420 }
421
422
423 }