Skip to content

Commit

Permalink
Fix total_forces_same_step flag for LAMMPS
Browse files Browse the repository at this point in the history
So far is was erroneously set to true, but its effects were not fully
implemented in ABF.
  • Loading branch information
jhenin authored and giacomofiorin committed Dec 17, 2024
1 parent 15eab75 commit f7337be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lammps/src/COLVARS/colvarproxy_lammps.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class colvarproxy_lammps : public colvarproxy {
public:

bool total_forces_enabled() const override { return total_force_requested; };
bool total_forces_same_step() const override { return true; };
// Total forces are saved at end of step, only processed at the next step
bool total_forces_same_step() const override { return false; };
bool want_exit() const { return do_exit; };

// perform colvars computation. returns biasing energy
Expand Down
1 change: 1 addition & 0 deletions src/colvarproxy_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class colvarproxy_system {
virtual bool total_forces_enabled() const;

/// Are total forces from the current step available?
/// in which case they are really system forces
virtual bool total_forces_same_step() const;

/// Get the molecule ID when called in VMD; raise error otherwise
Expand Down

0 comments on commit f7337be

Please sign in to comment.