From 54693815380d8c9e1963f3a17bd4fbd888faf40a Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Wed, 28 Feb 2018 17:56:08 +0100
Subject: [PATCH] regtest

---
 regtest/basic/rt-make-exceptions/main.cpp                    | 2 ++
 regtest/basic/rt-make-exceptions/output.reference            | 4 ++++
 regtest/basic/rt-make-exceptions/test_zero_align_weight.pdb  | 5 +++++
 .../basic/rt-make-exceptions/test_zero_displace_weight.pdb   | 5 +++++
 4 files changed, 16 insertions(+)
 create mode 100644 regtest/basic/rt-make-exceptions/test_zero_align_weight.pdb
 create mode 100644 regtest/basic/rt-make-exceptions/test_zero_displace_weight.pdb

diff --git a/regtest/basic/rt-make-exceptions/main.cpp b/regtest/basic/rt-make-exceptions/main.cpp
index 7f1120781..4bc166454 100644
--- a/regtest/basic/rt-make-exceptions/main.cpp
+++ b/regtest/basic/rt-make-exceptions/main.cpp
@@ -88,6 +88,8 @@ int main(){
   test_line(ofs,plumed,"d: COORDINATION GROUPA=1 GROUPB=2 SWITCH={WRONGNAME R_0=1.0}");
   test_line(ofs,plumed,"d: RMSD REFERENCE=missing.pdb");
   test_line(ofs,plumed,"d: RMSD REFERENCE=test-too-many-atoms.pdb");
+  test_line(ofs,plumed,"d: RMSD TYPE=OPTIMAL REFERENCE=test_zero_displace_weight.pdb");
+  test_line(ofs,plumed,"d: RMSD TYPE=OPTIMAL REFERENCE=test_zero_align_weight.pdb");
   test_line(ofs,plumed,"d: DRMSD REFERENCE=missing.pdb LOWER_CUTOFF=0.0 UPPER_CUTOFF=15.0");
 
 // these should not fail
diff --git a/regtest/basic/rt-make-exceptions/output.reference b/regtest/basic/rt-make-exceptions/output.reference
index 8d66cb212..c454fce33 100644
--- a/regtest/basic/rt-make-exceptions/output.reference
+++ b/regtest/basic/rt-make-exceptions/output.reference
@@ -40,6 +40,10 @@ readInputLine d: RMSD REFERENCE=missing.pdb
 +++ catched
 readInputLine d: RMSD REFERENCE=test-too-many-atoms.pdb
 +++ catched
+readInputLine d: RMSD TYPE=OPTIMAL REFERENCE=test_zero_displace_weight.pdb
++++ catched
+readInputLine d: RMSD TYPE=OPTIMAL REFERENCE=test_zero_align_weight.pdb
++++ catched
 readInputLine d: DRMSD REFERENCE=missing.pdb LOWER_CUTOFF=0.0 UPPER_CUTOFF=15.0
 +++ catched
 readInputLine RESTRAINT ARG=x(d) KAPPA=5 AT=0
diff --git a/regtest/basic/rt-make-exceptions/test_zero_align_weight.pdb b/regtest/basic/rt-make-exceptions/test_zero_align_weight.pdb
new file mode 100644
index 000000000..5e6200b59
--- /dev/null
+++ b/regtest/basic/rt-make-exceptions/test_zero_align_weight.pdb
@@ -0,0 +1,5 @@
+ATOM      2  O   ALA     2      -0.926  -2.447  -0.497  0.00  1.00      DIA  O
+ATOM      4  HNT ALA     2       0.533  -0.396   1.184  0.00  1.00      DIA  H
+ATOM      6  HT1 ALA     2      -0.216  -2.590   1.371  0.00  1.00      DIA  H
+ATOM      7  HT2 ALA     2      -0.309  -1.255   2.315  0.00  1.00      DIA  H
+ATOM      8  HT3 ALA     2      -1.480  -1.560   1.212  0.00  1.00      DIA  H
diff --git a/regtest/basic/rt-make-exceptions/test_zero_displace_weight.pdb b/regtest/basic/rt-make-exceptions/test_zero_displace_weight.pdb
new file mode 100644
index 000000000..34c313007
--- /dev/null
+++ b/regtest/basic/rt-make-exceptions/test_zero_displace_weight.pdb
@@ -0,0 +1,5 @@
+ATOM      2  O   ALA     2      -0.926  -2.447  -0.497  1.00  0.00      DIA  O
+ATOM      4  HNT ALA     2       0.533  -0.396   1.184  1.00  0.00      DIA  H
+ATOM      6  HT1 ALA     2      -0.216  -2.590   1.371  1.00  0.00      DIA  H
+ATOM      7  HT2 ALA     2      -0.309  -1.255   2.315  1.00  0.00      DIA  H
+ATOM      8  HT3 ALA     2      -1.480  -1.560   1.212  1.00  0.00      DIA  H
-- 
GitLab