colvars
colvars copied to clipboard
Is it possible to write grid files using the maximal available precision?
Sometimes if I get a grad file like https://gist.github.com/HanatoK/cc03687d55caa6c9a730a3a01ef1de06, then it is not able to integrate by abf_integrate
. The error message is:
ERROR: wrong coordinates in gradient file
Expected -12.1756, got -12.1755
Is it possible to increase the precision of grid files? I realize this may increase the file size, but can we use an option to specify the output precision?
Can you try just relaxing the test criterion slightly - in abf_data.cpp, replace lines 112-113 with:
double diff = mins[j] + widths[j] * (pos[j] + 0.5) - xi;
if ( diff * diff > 1e-7 ) {
I'm quite sure this is enough to catch the mistakes it is intended to detect.
Independently from that, maybe your needs would be covered by the poisson_integrator program under colvartools?
Independently from that, maybe your needs would be covered by the poisson_integrator program under colvartools?
@jhenin Thanks a lot! I have already tuned the parameters and rerun the simulation, so now abf_integrate
works fine. The reason why I do not want to use the pABF integrator is due to the artifacts near the boundaries, and my metastable states are just lying at the boundaries.
The reason why I do not want to use the pABF integrator is due to the artifacts near the boundaries, and my metastable states are just lying at the boundaries.
I want to improve the integrator to avoid such artifacts. Can you send me separately an example of gradient data that is not integrated correctly? Thanks!
@jhenin Hi, I have sent the files to your email address at ibpc.fr. Thanks!
Fixed by 6a7f38554e700e780c261e327a51e91468a9c5e4
@jhenin https://github.com/Colvars/colvars/commit/6a7f38554e700e780c261e327a51e91468a9c5e4 does not solve the issue completely, please see the files in https://gist.github.com/HanatoK/f4d17f914d1bc81b272879fe7ebec669. I just created a PR to use the same precision as the colvars.traj file.
Solved by #497