colvars icon indicating copy to clipboard operation
colvars copied to clipboard

Better error message for missing Lepton in subColvar

Open jhenin opened this issue 7 months ago • 2 comments

When using the NAMD regtest example of NeuralNetwork in a non-Lepton enabled build of VMD (and I assume other tools) I get:

colvars:   Error while constructing colvar number 1 : deleting.
    Error: the CV  expects one or more nesting components.
  Error: in setting up component "neuralNetwork".
Error parsing configuration file

whereas when used at the main colvar level, there is a more informative error message. The same error message should be shown when in a subColvar.

jhenin avatar May 31 '25 10:05 jhenin

Maybe I need to remove the ifdef guards in https://github.com/Colvars/colvars/blob/789029131bca128ff36017d4bdd0d98aaec495aa/src/colvar.cpp#L933-L935

HanatoK avatar Jun 01 '25 13:06 HanatoK

I think that's right!

jhenin avatar Jun 01 '25 21:06 jhenin