Skip to content

Commit f363f25

Browse files
committed
fix: Apply consistent check between total-force compute / collect steps
1 parent 4630fd4 commit f363f25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/colvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ int colvar::collect_cvc_data()
14621462

14631463
int error_code = COLVARS_OK;
14641464

1465-
if ((cvm::step_relative() > 0) && (!is_enabled(f_cv_total_force_current_step))){
1465+
if (cvm::main()->proxy->total_forces_valid() && (!is_enabled(f_cv_total_force_current_step))) {
14661466
// Total force depends on Jacobian derivative from previous timestep
14671467
// collect_cvc_total_forces() uses the previous value of jd
14681468
error_code |= collect_cvc_total_forces();

0 commit comments

Comments
 (0)