-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add examples of histogram configuration, with and without explicit grid parameters #468
Conversation
@giacomofiorin Thanks, I definitely agree on generalizing this to grid-based biases in general. I can do the documentation. |
tests/distance_angle_histogram2d.in
Outdated
# histogramGrid { | ||
# widths 0.2 6.0 | ||
# lowerBoundaries 0.0 0.0 | ||
# upperBoundaries 10.0 360.0 | ||
# } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this block commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a file that I accidentally committed before it was finished, but it's not used yet. I wanted first to simplify a bit the generation of the backend tests, but it's probably easier to still add it manually.
08179d6
to
c448135
Compare
This update includes one new feature (neural-network based collective variables), several small enhancements (including an automatic definition of grid boundaries for angle-based CVs, and a normalization option for eigenvector-based CVs), bugfixes and documentation improvements. Usage information for specific features included in the Colvars library (i.e. not just the library as a whole) is now also reported to the screen or LAMMPS logfile (as is done already in other LAMMPS classes). Notable to LAMMPS code development are the removals of duplicated code and of ambiguously-named preprocessor defines in the Colvars headers. Since the last PR, the existing regression tests have also been running automatically via GitHub Actions. The following pull requests in the Colvars repository are relevant to LAMMPS: - 475 Remove fatal error condition Colvars/colvars#475 (@jhenin, @giacomofiorin) - 474 Allow normalizing eigenvector vector components to deal with unit change Colvars/colvars#474 (@giacomofiorin, @jhenin) - 470 Better error handling in the initialization of NeuralNetwork CV Colvars/colvars#470 (@HanatoK) - 468 Add examples of histogram configuration, with and without explicit grid parameters Colvars/colvars#468 (@giacomofiorin) - 464 Fix lammps#463 using more fine-grained features Colvars/colvars#464 (@jhenin, @giacomofiorin) - 447 [RFC] New option "scaledBiasingForce" for colvarbias Colvars/colvars#447 (@HanatoK, @jhenin) - 444 [RFC] Implementation of dense neural network as CV Colvars/colvars#444 (@HanatoK, @giacomofiorin, @jhenin) - 443 Fix explicit gradient dependency of sub-CVs Colvars/colvars#443 (@HanatoK, @jhenin) - 442 Persistent bias count Colvars/colvars#442 (@jhenin, @giacomofiorin) - 437 Return type of bias from scripting interface Colvars/colvars#437 (@giacomofiorin) - 434 More flexible use of boundaries from colvars by grids Colvars/colvars#434 (@jhenin) - 433 Prevent double-free in linearCombination Colvars/colvars#433 (@HanatoK) - 428 More complete documentation for index file format (NDX) Colvars/colvars#428 (@giacomofiorin) - 426 Integrate functional version of backup_file() into base proxy class Colvars/colvars#426 (@giacomofiorin) - 424 Track CVC inheritance when documenting feature usage Colvars/colvars#424 (@giacomofiorin) - 419 Generate citation report while running computations Colvars/colvars#419 (@giacomofiorin, @jhenin) - 415 Rebin metadynamics bias from explicit hills when available Colvars/colvars#415 (@giacomofiorin) - 312 Ignore a keyword if it has content to the left of it (regardless of braces) Colvars/colvars#312 (@giacomofiorin) Authors: @giacomofiorin, @HanatoK, @jhenin
As the title says. Besides providing a useful example of the
histogram
itself, there is also a motivation to encourage users to usehistogramGrid
to avoid conflicts between multiple uses ofwidth
. The following is a situation (quoting @jhenin) where the role of thewidth
keyword becomes cumbersome:1) I want a harmonic restraint. I set the force constant to a value I would write in a paper, in kcal/mol/A^2, I leave
width
at default.2) I add a histogram block. For that I need to set
width
to some value different from 1.3) I need to change the value of the force constant in the harmonic block accordingly. I find this last step more complicated than necessary.
Thanks to the addition of the
histogramGrid { ... }
option in 2016, the above situation does not need to occur. But it requires reading the documentation to a deeper-than-average level of detail, which is unlikely to occur in such a situation. Hence the second example.Both examples also showcase the auto-detection of variables' boundaries, added earlier. I'm fine if people want to re-type those boundaries explicitly, but they should be aware of the auto-detection feature (which was necessary to remedy problems raised for metadynamics by the use of conventions adopted earlier in pre-Colvars ABF implementations).
On the subject of allowing custom grid parameters for biases (discussed earlier), I'm in favor of it and the core of the implementation is straightforward, just using
colvargrid<>::parse_params()
. @jhenin I can add the feature and the tests very quickly if you volunteer to document it.