Skip to content

Commit

Permalink
fix: fix the bug introduced in Colvars#541
Browse files Browse the repository at this point in the history
This commit aims to fix the incorrect optimization introduced in
commit adebdf6.
  • Loading branch information
HanatoK authored and giacomofiorin committed Oct 11, 2024
1 parent 398df07 commit 2be53ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/colvaratoms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ void cvm::atom_group::calc_fit_forces_impl(
atom_grad += accessor_main(i);
if (B_ag_rotate) pos_orig = rot_inv * (atoms[i].pos - ref_pos_cog);
} else {
if (B_ag_rotate) pos_orig = atoms[i].pos;
if (B_ag_rotate) pos_orig = rot_inv * atoms[i].pos;
}
if (B_ag_rotate) {
// calculate \partial(R(q) \vec{x}_i)/\partial q) \cdot \partial\xi/\partial\vec{x}_i
Expand Down

0 comments on commit 2be53ba

Please sign in to comment.