From 724aea2184a896ffc8a01a77cda208fbebf97bf2 Mon Sep 17 00:00:00 2001 From: Gareth Aneurin Tribello Date: Thu, 15 Feb 2024 12:40:24 +0000 Subject: [PATCH] Removed second build of active atom list to address issue #1025 --- src/core/DomainDecomposition.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/DomainDecomposition.cpp b/src/core/DomainDecomposition.cpp index ef5e56a4de..316c90989a 100644 --- a/src/core/DomainDecomposition.cpp +++ b/src/core/DomainDecomposition.cpp @@ -406,7 +406,8 @@ void DomainDecomposition::reset() { if( !unique_serial && int(gatindex.size())==getNumberOfAtoms() && shuffledAtoms==0 ) return; // This is an optimisation to ensure that we don't call std::fill over the whole forces // array if there are a small number of atoms passed between the MD code and PLUMED - getAllActiveAtoms( unique ); for(const auto & ip : inputs) (ip->copyOutput(0))->clearInputForce( unique ); + if( dd && shuffledAtoms>0 ) getAllActiveAtoms( unique ); + for(const auto & ip : inputs) (ip->copyOutput(0))->clearInputForce( unique ); } void DomainDecomposition::writeBinary(std::ostream&o) {