diff --git a/src/tools/LinkCells.cpp b/src/tools/LinkCells.cpp index 0fd678488f..72a1a0d3a5 100644 --- a/src/tools/LinkCells.cpp +++ b/src/tools/LinkCells.cpp @@ -212,11 +212,7 @@ std::array LinkCells::findMyCell( const Vector& pos ) const { } Vector fpos=mypbc.realToScaled( mypos ); for(unsigned j=0; j<3; ++j) { - if( nopbc ) { - celn[j] = std::floor( fpos[j] * ncells[j] ); - } else { - celn[j] = std::floor( ( Tools::pbc(fpos[j]) + 0.5 ) * ncells[j] ); - } + celn[j] = std::floor( ( Tools::pbc(fpos[j]) + 0.5 ) * ncells[j] ); plumed_assert( celn[j]>=0 && celn[j]