Closed akohlmey closed 11 years ago
or we could have a global flag in the colvarmodule, may_use_minimize, which is initialized to true in the constructor and any function that is not compatible with minimization would simply set it to false. a simple accessor method, bool cvm::min_compatible(return may_use_minimize;} could then be used to determine whether to terminate a run with a suitable error message or to continue.
To me there seems to be no algorithm that is completely incompatible with a minimization. Apart from restraints, which are obviously useful in minimization, one can use other biasing forces to let the system out of local minima. E.g. one could use metadynamics for a global minimum search, it wouldn't return a free energy nor a potential energy profile, but could still be useful as a bias.
So I think it is really up to the user to decide what to use and when, I don't think the code should make any decisions are than those strictly necessary to carry out a stable simulation.
ok. in that case, just printing a "you better know what you are doing" kind of warning message like the code is already doing, would be the right way to address this. great. that keeps things easy.
Parts of the functionality of the colvars library (e.g. restraints, analysis of collective variables) makes would make sense to be used during minimization, others less so. What should be the behavior of the module? should we have a flag that is passed to cvm::calc() to indicate what run type we have?