Colvars / colvars

Collective variables library for molecular simulation and analysis programs
http://colvars.github.io/
GNU Lesser General Public License v3.0
196 stars 56 forks source link

LAMMPS proxy end_of_step() masks base class method #677

Closed jhenin closed 3 months ago

jhenin commented 3 months ago

The LAMMPS proxy is the only one to override colvarproxy::end_of_step(). It should probably call the base class method. Alternately, maybe the current content of end_of_step() is totally generic, and we don't want it overridden by any proxy: then it should be its own non-virtual function.

giacomofiorin commented 3 months ago

end_of_step() is a member of FixColvars, which does not inherit from colvarproxy and therefore does not override it. Am I missing something?

jhenin commented 3 months ago

Sorry, my mistake.

giacomofiorin commented 3 months ago

NP. This is reminding us, though, that are testing in CI for hidden functions within the library, but not in the backends' proxies, where there is a ton of inheritance. If Clang is at the point where it can detect this kind of errors, it may be worth to switch building the backends with Clang rather than GCC.

(At least GROMACS and LAMMPS, where we know that these compilers are already tested in their native CI?).