colvars icon indicating copy to clipboard operation
colvars copied to clipboard

Complete gradient tests for all CVCs

Open jhenin opened this issue 4 months ago • 3 comments

TODO: check that all existing CVCs have their gradients tested by standalone functional tests (using debugGradients) or otherwise. For vector CVCs or ones with implicit gradients, a test based on VMD scripts could be used (WIP).

Update: tentative list of CVCs that do not currently have a functional test (they are covered by regression tests).

  • polar_theta
  • polar_phi
  • distance_xy
  • aspath
  • azpath
  • gspath
  • gzpath
  • aspathCV
  • azpathCV
  • gspathCV
  • gzpathCV
  • linearCombination

Vector CVCs that will need a different testing mechanism:

  • cartesian
  • orientation
  • distance_vec

jhenin avatar Aug 21 '25 17:08 jhenin

Is it possible to implement a debugForces option similar to debugGradients? There should be a way to capture the forces from the atom groups, and compare them with the cvforce * (numerical gradients of each components of a colvarvalue).

HanatoK avatar Aug 22 '25 02:08 HanatoK

The goal of this is to include CVCs with implicit gradients in the test, right? That sounds like a good idea.

jhenin avatar Aug 22 '25 17:08 jhenin

Partly addressed by #838

jhenin avatar Nov 17 '25 14:11 jhenin