From 166609cc9e3e6de6a4843d245a5949fc51ebdba4 Mon Sep 17 00:00:00 2001
From: Gareth Tribello <gareth.tribello@gmail.com>
Date: Sun, 8 Dec 2013 13:30:52 +0000
Subject: [PATCH] Added regtests for dihedral correlation

---
 regtest/multicolvar/rt-dihcor/Makefile        |   1 +
 regtest/multicolvar/rt-dihcor/config          |   4 +
 .../rt-dihcor/derivatives.reference           | 286 ++++++++++++++++++
 regtest/multicolvar/rt-dihcor/plumed.dat      |   3 +
 4 files changed, 294 insertions(+)
 create mode 100644 regtest/multicolvar/rt-dihcor/Makefile
 create mode 100644 regtest/multicolvar/rt-dihcor/config
 create mode 100644 regtest/multicolvar/rt-dihcor/derivatives.reference
 create mode 100644 regtest/multicolvar/rt-dihcor/plumed.dat

diff --git a/regtest/multicolvar/rt-dihcor/Makefile b/regtest/multicolvar/rt-dihcor/Makefile
new file mode 100644
index 000000000..3703b27ce
--- /dev/null
+++ b/regtest/multicolvar/rt-dihcor/Makefile
@@ -0,0 +1 @@
+include ../../scripts/test.make
diff --git a/regtest/multicolvar/rt-dihcor/config b/regtest/multicolvar/rt-dihcor/config
new file mode 100644
index 000000000..ba8b77857
--- /dev/null
+++ b/regtest/multicolvar/rt-dihcor/config
@@ -0,0 +1,4 @@
+type=driver
+# this is to test a different name
+arg="--plumed plumed.dat --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%8.4f"
+extra_files="../../trajectories/trajectory.xyz"
diff --git a/regtest/multicolvar/rt-dihcor/derivatives.reference b/regtest/multicolvar/rt-dihcor/derivatives.reference
new file mode 100644
index 000000000..61df93168
--- /dev/null
+++ b/regtest/multicolvar/rt-dihcor/derivatives.reference
@@ -0,0 +1,286 @@
+#! FIELDS time parameter c1 c1num
+ 0.000000 0  -0.1041  -0.1041
+ 0.000000 1   0.1044   0.1044
+ 0.000000 2   0.0357   0.0357
+ 0.000000 3  -0.1213  -0.1213
+ 0.000000 4  -0.1363  -0.1363
+ 0.000000 5  -0.0436  -0.0436
+ 0.000000 6   0.5638   0.5638
+ 0.000000 7   0.0959   0.0959
+ 0.000000 8   0.0251   0.0251
+ 0.000000 9  -0.3384  -0.3384
+ 0.000000 10  -0.0641  -0.0641
+ 0.000000 11  -0.0172  -0.0172
+ 0.000000 12   0.1046   0.1046
+ 0.000000 13   0.0958   0.0958
+ 0.000000 14  -0.0924  -0.0924
+ 0.000000 15  -0.0580  -0.0580
+ 0.000000 16   0.0011   0.0011
+ 0.000000 17   0.0545   0.0545
+ 0.000000 18  -0.0229  -0.0229
+ 0.000000 19  -0.1796  -0.1796
+ 0.000000 20   0.0106   0.0106
+ 0.000000 21  -0.0238  -0.0238
+ 0.000000 22   0.0828   0.0828
+ 0.000000 23   0.0273   0.0273
+ 0.000000 24   0.2318   0.2318
+ 0.000000 25   0.2122   0.2122
+ 0.000000 26  -0.2047  -0.2047
+ 0.000000 27  -0.1284  -0.1284
+ 0.000000 28   0.0023   0.0023
+ 0.000000 29   0.1207   0.1207
+ 0.000000 30  -0.0508  -0.0508
+ 0.000000 31  -0.3979  -0.3979
+ 0.000000 32   0.0235   0.0235
+ 0.000000 33  -0.0526  -0.0526
+ 0.000000 34   0.1833   0.1833
+ 0.000000 35   0.0606   0.0606
+ 0.000000 36  -0.1939  -0.1939
+ 0.000000 37  -0.2698  -0.2698
+ 0.000000 38   0.2272   0.2272
+ 0.000000 39   0.2757   0.2757
+ 0.000000 40   0.3202   0.3202
+ 0.000000 41  -0.3184  -0.3184
+ 0.000000 42  -0.0357  -0.0357
+ 0.000000 43   0.1389   0.1389
+ 0.000000 44   0.0283   0.0283
+ 0.000000 45  -0.0461  -0.0461
+ 0.000000 46  -0.1893  -0.1893
+ 0.000000 47   0.0630   0.0630
+ 0.000000 48  -0.3333  -0.3333
+ 0.000000 49   0.2108   0.2108
+ 0.000000 50   0.2426   0.2426
+ 0.000000 51   0.2108   0.2108
+ 0.000000 52   0.5382   0.5382
+ 0.000000 53  -0.0342  -0.0342
+ 0.000000 54   0.2426   0.2426
+ 0.000000 55  -0.0342  -0.0342
+ 0.000000 56  -0.2049  -0.2049
+ 0.005000 0  -0.0551  -0.0551
+ 0.005000 1   0.0557   0.0557
+ 0.005000 2   0.0186   0.0186
+ 0.005000 3  -0.0765  -0.0765
+ 0.005000 4  -0.0907  -0.0907
+ 0.005000 5  -0.0288  -0.0288
+ 0.005000 6   0.3224   0.3224
+ 0.005000 7   0.0940   0.0940
+ 0.005000 8   0.0278   0.0278
+ 0.005000 9  -0.1908  -0.1908
+ 0.005000 10  -0.0590  -0.0590
+ 0.005000 11  -0.0175  -0.0175
+ 0.005000 12   0.0568   0.0568
+ 0.005000 13   0.0532   0.0532
+ 0.005000 14  -0.0489  -0.0489
+ 0.005000 15  -0.0268  -0.0268
+ 0.005000 16   0.0007   0.0007
+ 0.005000 17   0.0254   0.0254
+ 0.005000 18  -0.0193  -0.0193
+ 0.005000 19  -0.0982  -0.0982
+ 0.005000 20   0.0092   0.0092
+ 0.005000 21  -0.0107  -0.0107
+ 0.005000 22   0.0443   0.0443
+ 0.005000 23   0.0142   0.0142
+ 0.005000 24   0.2388   0.2388
+ 0.005000 25   0.2235   0.2235
+ 0.005000 26  -0.2053  -0.2053
+ 0.005000 27  -0.1125  -0.1125
+ 0.005000 28   0.0030   0.0030
+ 0.005000 29   0.1067   0.1067
+ 0.005000 30  -0.0813  -0.0813
+ 0.005000 31  -0.4125  -0.4125
+ 0.005000 32   0.0388   0.0388
+ 0.005000 33  -0.0450  -0.0450
+ 0.005000 34   0.1860   0.1860
+ 0.005000 35   0.0598   0.0598
+ 0.005000 36  -0.1526  -0.1526
+ 0.005000 37  -0.3296  -0.3296
+ 0.005000 38   0.2329   0.2329
+ 0.005000 39   0.2213   0.2213
+ 0.005000 40   0.4168   0.4168
+ 0.005000 41  -0.3274  -0.3274
+ 0.005000 42  -0.0374  -0.0374
+ 0.005000 43   0.1117   0.1117
+ 0.005000 44   0.0248   0.0248
+ 0.005000 45  -0.0313  -0.0313
+ 0.005000 46  -0.1988  -0.1988
+ 0.005000 47   0.0697   0.0697
+ 0.005000 48  -0.2387  -0.2387
+ 0.005000 49   0.1850   0.1850
+ 0.005000 50   0.1887   0.1887
+ 0.005000 51   0.1850   0.1850
+ 0.005000 52   0.4202   0.4202
+ 0.005000 53  -0.0472  -0.0472
+ 0.005000 54   0.1887   0.1887
+ 0.005000 55  -0.0472  -0.0472
+ 0.005000 56  -0.1814  -0.1814
+ 0.010000 0   0.0162   0.0162
+ 0.010000 1  -0.0173  -0.0173
+ 0.010000 2  -0.0054  -0.0054
+ 0.010000 3   0.0257   0.0257
+ 0.010000 4   0.0370   0.0370
+ 0.010000 5   0.0114   0.0114
+ 0.010000 6  -0.1021  -0.1021
+ 0.010000 7  -0.0506  -0.0506
+ 0.010000 8  -0.0155  -0.0155
+ 0.010000 9   0.0603   0.0603
+ 0.010000 10   0.0309   0.0309
+ 0.010000 11   0.0094   0.0094
+ 0.010000 12  -0.0165  -0.0165
+ 0.010000 13  -0.0176  -0.0176
+ 0.010000 14   0.0154   0.0154
+ 0.010000 15   0.0063   0.0063
+ 0.010000 16   0.0009   0.0009
+ 0.010000 17  -0.0064  -0.0064
+ 0.010000 18   0.0072   0.0072
+ 0.010000 19   0.0296   0.0296
+ 0.010000 20  -0.0050  -0.0050
+ 0.010000 21   0.0030   0.0030
+ 0.010000 22  -0.0129  -0.0129
+ 0.010000 23  -0.0041  -0.0041
+ 0.010000 24   0.2365   0.2365
+ 0.010000 25   0.2535   0.2535
+ 0.010000 26  -0.2220  -0.2220
+ 0.010000 27  -0.0907  -0.0907
+ 0.010000 28  -0.0127  -0.0127
+ 0.010000 29   0.0917   0.0917
+ 0.010000 30  -0.1030  -0.1030
+ 0.010000 31  -0.4260  -0.4260
+ 0.010000 32   0.0720   0.0720
+ 0.010000 33  -0.0429  -0.0429
+ 0.010000 34   0.1852   0.1852
+ 0.010000 35   0.0583   0.0583
+ 0.010000 36  -0.1190  -0.1190
+ 0.010000 37  -0.3806  -0.3806
+ 0.010000 38   0.2273   0.2273
+ 0.010000 39   0.1639   0.1639
+ 0.010000 40   0.4814   0.4814
+ 0.010000 41  -0.3042  -0.3042
+ 0.010000 42  -0.0163  -0.0163
+ 0.010000 43   0.1072   0.1072
+ 0.010000 44  -0.0020  -0.0020
+ 0.010000 45  -0.0287  -0.0287
+ 0.010000 46  -0.2080  -0.2080
+ 0.010000 47   0.0789   0.0789
+ 0.010000 48  -0.0929  -0.0929
+ 0.010000 49   0.1000   0.1000
+ 0.010000 50   0.1338   0.1338
+ 0.010000 51   0.1000   0.1000
+ 0.010000 52   0.2519   0.2519
+ 0.010000 53  -0.0733  -0.0733
+ 0.010000 54   0.1338   0.1338
+ 0.010000 55  -0.0733  -0.0733
+ 0.010000 56  -0.1589  -0.1589
+ 0.015000 0   0.1023   0.1023
+ 0.015000 1  -0.1201  -0.1201
+ 0.015000 2  -0.0333  -0.0333
+ 0.015000 3   0.1587   0.1587
+ 0.015000 4   0.3507   0.3507
+ 0.015000 5   0.1013   0.1013
+ 0.015000 6  -0.6418  -0.6418
+ 0.015000 7  -0.5893  -0.5893
+ 0.015000 8  -0.1736  -0.1736
+ 0.015000 9   0.3809   0.3809
+ 0.015000 10   0.3588   0.3588
+ 0.015000 11   0.1056   0.1056
+ 0.015000 12  -0.1076  -0.1076
+ 0.015000 13  -0.1292  -0.1292
+ 0.015000 14   0.1119   0.1119
+ 0.015000 15   0.0303   0.0303
+ 0.015000 16   0.0107   0.0107
+ 0.015000 17  -0.0331  -0.0331
+ 0.015000 18   0.0590   0.0590
+ 0.015000 19   0.2015   0.2015
+ 0.015000 20  -0.0529  -0.0529
+ 0.015000 21   0.0184   0.0184
+ 0.015000 22  -0.0830  -0.0830
+ 0.015000 23  -0.0259  -0.0259
+ 0.015000 24   0.2365   0.2365
+ 0.015000 25   0.2839   0.2839
+ 0.015000 26  -0.2460  -0.2460
+ 0.015000 27  -0.0665  -0.0665
+ 0.015000 28  -0.0235  -0.0235
+ 0.015000 29   0.0728   0.0728
+ 0.015000 30  -0.1295  -0.1295
+ 0.015000 31  -0.4427  -0.4427
+ 0.015000 32   0.1163   0.1163
+ 0.015000 33  -0.0404  -0.0404
+ 0.015000 34   0.1823   0.1823
+ 0.015000 35   0.0568   0.0568
+ 0.015000 36  -0.1110  -0.1110
+ 0.015000 37  -0.4001  -0.4001
+ 0.015000 38   0.2118   0.2118
+ 0.015000 39   0.1419   0.1419
+ 0.015000 40   0.4957   0.4957
+ 0.015000 41  -0.2685  -0.2685
+ 0.015000 42   0.0076   0.0076
+ 0.015000 43   0.1124   0.1124
+ 0.015000 44  -0.0269  -0.0269
+ 0.015000 45  -0.0385  -0.0385
+ 0.015000 46  -0.2080  -0.2080
+ 0.015000 47   0.0836   0.0836
+ 0.015000 48   0.1324   0.1324
+ 0.015000 49   0.0366   0.0366
+ 0.015000 50   0.0786   0.0786
+ 0.015000 51   0.0366   0.0366
+ 0.015000 52  -0.0185  -0.0185
+ 0.015000 53  -0.0943  -0.0943
+ 0.015000 54   0.0786   0.0786
+ 0.015000 55  -0.0943  -0.0943
+ 0.015000 56  -0.1139  -0.1139
+ 0.020000 0   0.1634   0.1634
+ 0.020000 1  -0.2067  -0.2067
+ 0.020000 2  -0.0509  -0.0509
+ 0.020000 3   0.1311   0.1311
+ 0.020000 4   0.7385   0.7385
+ 0.020000 5   0.1960   0.1960
+ 0.020000 6  -0.7194  -0.7194
+ 0.020000 7  -1.3637  -1.3637
+ 0.020000 8  -0.3712  -0.3712
+ 0.020000 9   0.4249   0.4249
+ 0.020000 10   0.8318   0.8318
+ 0.020000 11   0.2261   0.2261
+ 0.020000 12  -0.1790  -0.1790
+ 0.020000 13  -0.2167  -0.2167
+ 0.020000 14   0.1980   0.1980
+ 0.020000 15   0.0402   0.0402
+ 0.020000 16   0.0169   0.0169
+ 0.020000 17  -0.0463  -0.0463
+ 0.020000 18   0.1079   0.1079
+ 0.020000 19   0.3350   0.3350
+ 0.020000 20  -0.1075  -0.1075
+ 0.020000 21   0.0309   0.0309
+ 0.020000 22  -0.1351  -0.1351
+ 0.020000 23  -0.0443  -0.0443
+ 0.020000 24   0.2359   0.2359
+ 0.020000 25   0.2856   0.2856
+ 0.020000 26  -0.2610  -0.2610
+ 0.020000 27  -0.0529  -0.0529
+ 0.020000 28  -0.0223  -0.0223
+ 0.020000 29   0.0610   0.0610
+ 0.020000 30  -0.1422  -0.1422
+ 0.020000 31  -0.4415  -0.4415
+ 0.020000 32   0.1417   0.1417
+ 0.020000 33  -0.0408  -0.0408
+ 0.020000 34   0.1781   0.1781
+ 0.020000 35   0.0583   0.0583
+ 0.020000 36  -0.1347  -0.1347
+ 0.020000 37  -0.3875  -0.3875
+ 0.020000 38   0.2094   0.2094
+ 0.020000 39   0.1662   0.1662
+ 0.020000 40   0.4698   0.4698
+ 0.020000 41  -0.2581  -0.2581
+ 0.020000 42   0.0211   0.0211
+ 0.020000 43   0.1232   0.1232
+ 0.020000 44  -0.0349  -0.0349
+ 0.020000 45  -0.0526  -0.0526
+ 0.020000 46  -0.2054  -0.2054
+ 0.020000 47   0.0836   0.0836
+ 0.020000 48   0.2775   0.2775
+ 0.020000 49   0.0663   0.0663
+ 0.020000 50   0.0517   0.0517
+ 0.020000 51   0.0663   0.0663
+ 0.020000 52  -0.2228  -0.2228
+ 0.020000 53  -0.0706  -0.0706
+ 0.020000 54   0.0517   0.0517
+ 0.020000 55  -0.0706  -0.0706
+ 0.020000 56  -0.0547  -0.0547
diff --git a/regtest/multicolvar/rt-dihcor/plumed.dat b/regtest/multicolvar/rt-dihcor/plumed.dat
new file mode 100644
index 000000000..f87fb4a77
--- /dev/null
+++ b/regtest/multicolvar/rt-dihcor/plumed.dat
@@ -0,0 +1,3 @@
+DIHCOR ATOMS1=1,3,6,10,2,4,7,9 ATOMS2=2,4,7,9,5,8,11,13 LABEL=c1
+DIHCOR ATOMS1=1,3,6,10,2,4,7,9 ATOMS2=2,4,7,9,5,8,11,13 NUMERICAL_DERIVATIVES LABEL=c1num
+DUMPDERIVATIVES ARG=c1.*,c1num.* STRIDE=1 FILE=derivatives FMT=%8.4f
-- 
GitLab