Skip to content

Commit

Permalink
Modified the definition of cv_force such that it contains the informa…
Browse files Browse the repository at this point in the history
…tion on the size
  • Loading branch information
zwpku committed Aug 28, 2023
1 parent 110b08f commit 21ee264
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/colvarcomp_combination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ void colvar::customColvar::apply_force(colvarvalue const &force) {
}
} else {
const colvarvalue& current_cv_value = cv[i_cv]->value();
colvarvalue cv_force(current_cv_value.type());
colvarvalue cv_force(current_cv_value);
cv_force.reset();
const cvm::real factor_polynomial = getPolynomialFactorOfCVGradient(i_cv);
for (size_t j_elem = 0; j_elem < current_cv_value.size(); ++j_elem) {
for (size_t c = 0; c < x.size(); ++c) {
Expand Down

0 comments on commit 21ee264

Please sign in to comment.