View Javadoc
1   // ******************************************************************************
2   //
3   // Title:       Force Field X.
4   // Description: Force Field X - Software for Molecular Biophysics.
5   // Copyright:   Copyright (c) Michael J. Schnieders 2001-2024.
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.groovy;
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                         },
155                         /*
156                          * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
157                          * published values (Corrigan et. al. 2023) due to small multipole updates to the
158                          * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
159                          *
160                          * The error magnitude is <2 kcal for each term
161                         */
162                         {
163                                 "Protein (1bpi) with GK from Corrigan et al (2023)",
164                                 "1bpi.xyz",
165                                 892, // Atoms
166                                 281.75870048, // Bond
167                                 906,
168                                 235.11731039, // Angle
169                                 1626,
170                                 -12.11600646, // Stretch-Bend
171                                 1455,
172                                 0.0, // Urey-Bradley
173                                 0,
174                                 28.91012526, // Out-of-Plane
175                                 597,
176                                 69.15283653, // Torsion
177                                 2391,
178                                 0.0, // Improper Torsion
179                                 0,
180                                 27.49698981, // Pi-Orbital Torsion
181                                 109,
182                                 -36.43950083,  // Torsion-Torsion
183                                 6,
184                                 0.0, // Stretch-Torsion
185                                 0,
186                                 0.0, // Angle-Torsion
187                                 0,
188                                 470.1728659015, // vdW
189                                 394854,
190                                 -1189.88505475, // Permanent
191                                 394854,
192                                 -242.15918841, // Polarization
193                                 394854,
194                                 -923.17087281, // Total Solvation
195                                 //Generalized Kirkwood -970.64995804
196                                 //Cavitation 444.79997963, Dispersion -397.32089439
197                                 398278,
198                                 false
199                         },
200                         /*
201                          * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
202                          * published values (Corrigan et. al. 2023) due to small multipole updates to the
203                          * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
204                          *
205                          * The error magnitude is <2 kcal for each term
206                         */
207                         {
208                                 "Protein (1bpi) with GK from Corrigan et al (2023) - No Neck",
209                                 "1bpi.noneck.xyz",
210                                 892, // Atoms
211                                 281.75870048, // Bond
212                                 906,
213                                 235.11731039, // Angle
214                                 1626,
215                                 -12.11600646, // Stretch-Bend
216                                 1455,
217                                 0.0, // Urey-Bradley
218                                 0,
219                                 28.91012526, // Out-of-Plane
220                                 597,
221                                 69.15283653, // Torsion
222                                 2391,
223                                 0.0, // Improper Torsion
224                                 0,
225                                 27.49698981, // Pi-Orbital Torsion
226                                 109,
227                                 -36.43950083,  // Torsion-Torsion
228                                 6,
229                                 0.0, // Stretch-Torsion
230                                 0,
231                                 0.0, // Angle-Torsion
232                                 0,
233                                 470.1728659015, // vdW
234                                 394854,
235                                 -1189.88505475, // Permanent
236                                 394854,
237                                 -242.15918841, // Polarization
238                                 394854,
239                                 -900.45662762, // Total Solvation
240                                 //Generalized Kirkwood -947.93571285
241                                 //Cavitation 444.79997963, Dispersion -397.32089439
242                                 398278,
243                                 false
244                         },
245                         /*
246                          * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
247                          * published values (Corrigan et. al. 2023) due to small multipole updates to the
248                          * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
249                          *
250                          * The error magnitude is <2 kcal for each term
251                         */
252                         {
253                                 "Protein (1bpi) with GK from Corrigan et al (2023) - No Tanh",
254                                 "1bpi.notanh.xyz",
255                                 892, // Atoms
256                                 281.75870048, // Bond
257                                 906,
258                                 235.11731039, // Angle
259                                 1626,
260                                 -12.11600646, // Stretch-Bend
261                                 1455,
262                                 0.0, // Urey-Bradley
263                                 0,
264                                 28.91012526, // Out-of-Plane
265                                 597,
266                                 69.15283653, // Torsion
267                                 2391,
268                                 0.0, // Improper Torsion
269                                 0,
270                                 27.49698981, // Pi-Orbital Torsion
271                                 109,
272                                 -36.43950083,  // Torsion-Torsion
273                                 6,
274                                 0.0, // Stretch-Torsion
275                                 0,
276                                 0.0, // Angle-Torsion
277                                 0,
278                                 470.1728659015, // vdW
279                                 394854,
280                                 -1189.88505475, // Permanent
281                                 394854,
282                                 -242.15918841, // Polarization
283                                 394854,
284                                 -1241.80712005, // Total Solvation
285                                 //Generalized Kirkwood  -1289.28620528
286                                 //Cavitation 444.79997963, Dispersion -397.32089439
287                                 398278,
288                                 false
289                         },
290                         /*
291                          * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
292                          * published values (Corrigan et. al. 2023) due to small multipole updates to the
293                          * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
294                          *
295                          * The error magnitude is <2 kcal for each term
296                         */
297                         {
298                                 "Protein (1bpi) with GK from Corrigan et al (2023) - No Neck, No Tanh",
299                                 "1bpi.noneck.notanh.xyz",
300                                 892, // Atoms
301                                 281.75870048, // Bond
302                                 906,
303                                 235.11731039, // Angle
304                                 1626,
305                                 -12.11600646, // Stretch-Bend
306                                 1455,
307                                 0.0, // Urey-Bradley
308                                 0,
309                                 28.91012526, // Out-of-Plane
310                                 597,
311                                 69.15283653, // Torsion
312                                 2391,
313                                 0.0, // Improper Torsion
314                                 0,
315                                 27.49698981, // Pi-Orbital Torsion
316                                 109,
317                                 -36.43950083,  // Torsion-Torsion
318                                 6,
319                                 0.0, // Stretch-Torsion
320                                 0,
321                                 0.0, // Angle-Torsion
322                                 0,
323                                 470.1728659015, // vdW
324                                 394854,
325                                 -1189.88505475, // Permanent
326                                 394854,
327                                 -242.15918841, // Polarization
328                                 394854,
329                                 -1325.30614458, // Total Solvation
330                                 //Generalized Kirkwood  -1372.78522981
331                                 //Cavitation 444.79997963, Dispersion -397.32089439
332                                 398278,
333                                 false
334                         },
335                         /*
336                          * Test values for Solvation/GK/Atomic Multipoles/Polarization don't exactly match
337                          * published values (Corrigan et. al. 2023) due to small multipole updates to the
338                          * AMOEBA-BIO-2018 force field made in early 2023 to accommodate CpHMD work
339                          *
340                          * The error magnitude is <2 kcal for each term
341                         */
342                         {
343                                 "Protein (1bpi) with GK from Corrigan et al (2023) - No Element HCT or Interstitial Space Corrections",
344                                 "1bpi.noelemhct.xyz",
345                                 892, // Atoms
346                                 281.75870048, // Bond
347                                 906,
348                                 235.11731039, // Angle
349                                 1626,
350                                 -12.11600646, // Stretch-Bend
351                                 1455,
352                                 0.0, // Urey-Bradley
353                                 0,
354                                 28.91012526, // Out-of-Plane
355                                 597,
356                                 69.15283653, // Torsion
357                                 2391,
358                                 0.0, // Improper Torsion
359                                 0,
360                                 27.49698981, // Pi-Orbital Torsion
361                                 109,
362                                 -36.43950083,  // Torsion-Torsion
363                                 6,
364                                 0.0, // Stretch-Torsion
365                                 0,
366                                 0.0, // Angle-Torsion
367                                 0,
368                                 470.1728659015, // vdW
369                                 394854,
370                                 -1189.88505475, // Permanent
371                                 394854,
372                                 -242.15918841, // Polarization
373                                 394854,
374                                 -1330.12099084, // Total Solvation
375                                 //Generalized Kirkwood  -1377.60007607
376                                 //Cavitation 444.79997963, Dispersion -397.32089439
377                                 398278,
378                                 false
379                         },
380                         {
381                                 "Protein (1bpi) with GK from Corrigan et al (2021)",
382                                 "1bpi.gk2021.xyz",
383                                 892, // Atoms
384                                 281.75870048, // Bond
385                                 906,
386                                 235.11731039, // Angle
387                                 1626,
388                                 -12.11600646, // Stretch-Bend
389                                 1455,
390                                 0.0, // Urey-Bradley
391                                 0,
392                                 28.91012526, // Out-of-Plane
393                                 597,
394                                 69.15283653, // Torsion
395                                 2391,
396                                 0.0, // Improper Torsion
397                                 0,
398                                 27.49698981, // Pi-Orbital Torsion
399                                 109,
400                                 -36.43950083,  // Torsion-Torsion
401                                 6,
402                                 0.0, // Stretch-Torsion
403                                 0,
404                                 0.0, // Angle-Torsion
405                                 0,
406                                 470.1728659015, // vdW
407                                 394854,
408                                 -1189.885054752826, // Permanent
409                                 394854,
410                                 -242.15918841434635, // Polarization
411                                 394854,
412                                 -1166.1124974225615, // Total Solvation
413                                 398278,
414                                 false
415                         }
416 
417                 });
418     }
419 
420 
421 }