Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Oct 11, 2024
1 parent c099c17 commit 0e0ce44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/colvarvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0e0ce44

Please sign in to comment.