diff --git a/CHANGES/v2.3.txt b/CHANGES/v2.3.txt index 52db3250084d6f0379ad76d26f74d78276849b7c..d3229aa7e5dcb19fb836461f4fe6521dede47c90 100644 --- a/CHANGES/v2.3.txt +++ b/CHANGES/v2.3.txt @@ -155,6 +155,8 @@ See branch \branch{v2.3} on git repository. - Fixed bug in if condition in \ref PCAVARS so that you can run with only one eigenvector defined in input - Fixed but with timers in \ref sum_hills \issue{194}. - Fixed bug when using \ref MOVINGRESTRAINT with periodic variables such as \ref TORSION \issue{225}. +- 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/adjmat/AdjacencyMatrixBase.cpp b/src/adjmat/AdjacencyMatrixBase.cpp index ab067b0cc7bd376685c1febffcf50aa0f2826723..4f9844f9bc36cc7190808f7bba8836df9028fc9f 100644 --- a/src/adjmat/AdjacencyMatrixBase.cpp +++ b/src/adjmat/AdjacencyMatrixBase.cpp @@ -149,8 +149,15 @@ void AdjacencyMatrixBase::retrieveTypeDimensions( unsigned& nrows, unsigned& nco void AdjacencyMatrixBase::finishMatrixSetup( const bool& symmetric, const std::vector<AtomNumber>& all_atoms ){ std::string param; if( symmetric && ablocks[0].size()==ablocks[1].size() ) param="SYMMETRIC"; - if( !symmetric && ablocks[0].size()==ablocks[1].size() ) param="HBONDS"; - + if( !symmetric ){ + bool usehbonds=( ablocks[0].size()==ablocks[1].size() ); + if( usehbonds ){ + for(unsigned i=0;i<ablocks[0].size();++i){ + if( ablocks[0][i]!=ablocks[1][i] ){ usehbonds = false; break; } + } + if( usehbonds ) param="HBONDS"; + } + } vesselbase::VesselOptions da("","",0,param,this); Keywords keys; AdjacencyMatrixVessel::registerKeywords( keys ); diff --git a/src/multicolvar/Distances.cpp b/src/multicolvar/Distances.cpp index 0ff7ab6d1a0871de08ab578ecd26c5af709ba403..4ea6d867e9569d52941149b3c1cff3711ae5acf2 100644 --- a/src/multicolvar/Distances.cpp +++ b/src/multicolvar/Distances.cpp @@ -174,7 +174,7 @@ MultiColvarBase(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){