From 23b35c73dbe57d9efaec898e3d0d5bd365d64a23 Mon Sep 17 00:00:00 2001
From: Gareth Tribello <gareth.tribello@gmail.com>
Date: Wed, 12 Apr 2017 14:40:21 -0300
Subject: [PATCH] Fixed bug in DISTANCES that appears when you use BETWEEN and
 link cells

---
 CHANGES/v2.3.txt              | 1 +
 src/multicolvar/Distances.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES/v2.3.txt b/CHANGES/v2.3.txt
index a6b305664..955a18246 100644
--- a/CHANGES/v2.3.txt
+++ b/CHANGES/v2.3.txt
@@ -154,6 +154,7 @@ See branch \branch{v2.3} on git repository.
 - fix a bug in \ref CS2BACKBONE (v2.3.1) related to ring currents of HIS and TRP
 - Fixed bug in if condition in \ref PCAVARS so that you can run with only one eigenvector defined in input 
 - Fixed bug in \ref HBONDS that used to apear when you used DONORNS and ACCEPTORS with same numbers of atoms 
+- Fixed bug in \ref DISTANCES that appears when using BETWEEN and link cells.
 
 For developers:
 - plumedcheck validation has been made stricter. All the checks are now described in the developer manual.
diff --git a/src/multicolvar/Distances.cpp b/src/multicolvar/Distances.cpp
index 3f76a8771..629271284 100644
--- a/src/multicolvar/Distances.cpp
+++ b/src/multicolvar/Distances.cpp
@@ -165,7 +165,7 @@ PLUMED_MULTICOLVAR_INIT(ao)
          use_link=true; rcut=lt->getCutoff();
      } else {
          vesselbase::Between* bt=dynamic_cast<vesselbase::Between*>( getPntrToVessel(0) );
-         if( bt ) use_link=true; rcut=bt->getCutoff();
+         if( bt ){ use_link=true; rcut=bt->getCutoff(); }
      }
      if( use_link ){
          for(unsigned i=1;i<getNumberOfVessels();++i){
-- 
GitLab