From 0e0ce447630e95f2cd0322b1699e7f60b526ef9f Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Fri, 11 Oct 2024 16:16:46 -0400 Subject: [PATCH] Add comment --- src/colvarvalue.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/colvarvalue.cpp b/src/colvarvalue.cpp index 0a7223d9e..d03708b07 100644 --- a/src/colvarvalue.cpp +++ b/src/colvarvalue.cpp @@ -663,6 +663,8 @@ colvarvalue colvarvalue::dist2_grad(colvarvalue const &x2) const { colvarvalue::check_types(*this, x2); + // Compute derivative with respect to (*this) + switch (this->value_type) { case colvarvalue::type_scalar: return 2.0 * (this->real_value - x2.real_value);