Support full initialization of volumetric maps within Colvars#737
Support full initialization of volumetric maps within Colvars#737giacomofiorin wants to merge 23 commits into
Conversation
10238ef to
6c2ac5b
Compare
|
It seems with this PR and NAMD's main branch, the interface volmap tests are still failed either in the CPU build or in the GPU build. Do I miss something? |
Correct, this PR tries to fix the issue of NAMD raising an error when gridForces are defined with GPU-resident, even if they are never meant to be used on the GPU. By making Colvars load them instead, the user's intent is much clearer. The issue of NAMD main no longer supporting reduction via ComputeGlobal (on any hardware configuration) still remains unaddressed. (EDIT: Should be fixed soon as of April 2026, but performance with GPU-resident is not great) |
42ed8ad to
4c45a16
Compare
|
Is this ready for review? |
|
@jhenin I have a few jobs that showed discontinuities upon restarting: likely a PBC issue. I converted it back to draft accordingly. |
d191eb2 to
180446a
Compare
180446a to
cec10ae
Compare
cec10ae to
1546df5
Compare
ed017ad to
702b47b
Compare
|
After rebasing onto
|
Here, the main test is that numatoms (computed internally by Colvars) is equal to numatoms_ref (computed by NAMD)
Also remove a few heap allocations
Allow different deformation amplitude between leaflets, small fixes Fix reading input from --deformation-map-mask option Issue identified by @1004parky, mask map was initialized to 1 in all cases. Silence NumPy warnings Small fixes Fix handling of PDB files in generated VMD input Make single-map CVs optional Allow customizing selection for COM and orientation restraints Make generated NAMD and VMD scripts more uniform Unify writing of Colvars input between NAMD and VMD Add support for mapFile keyword
702b47b to
3a068b1
Compare
|
All tests pass now, minus the small numerical deviations in AMD64 due to the use of the NAMD GridForces code, which uses single-precision math. I disabled those. |
Currently, volumetric map and Multi-Map variables (link) are implemented in NAMD in two ways:
MGridForcekeywords, with atoms selected byMGridForceFileand scalable computation over multiple processors/nodes done by NAMD as implemented here (more efficient)MGridForcekeywords, but with atoms selected and processed internally by Colvars (more flexible)In VMD the situation is similar, with
MGridForcereplaced by VMD commands and with the distinction thatThis PR improves the use-case no. 2, i.e. when atoms are selected and processed directly by Colvars. It allows to specify the volumetric map's file name directly in the Colvars configuration, with the following advantages:
One disadvantage of processing the atoms and the maps internally to Colvars is that NAMD's parallel communication cannot be used any more (use-case no. 1). However, in today's most GPU-based computations there are not many CPU tasks.
The documentation and the Colvars Dashboard template for
mapTotalare updated accordingly. Additionally, there is now a template configuration for a Multi-Map variable as well (although using the generator script is still preferred)