Bug #1308
When running normal modes on a structure, unless one thread is used, the energy will not be the same as the previous minimization
Description
As noted above:
No idea who to assign to.
When I minimize a structure, I can get down to the force max being <0.01
Low-Memory BFGS Minimizer converged to Fmax < 0.01 in 6839 steps
Potential Energy = -5.12340607768673e+03
Maximum force = 6.68907856457542e-03 on atom 3029
Norm of force = 2.19978176343026e-03
kJ/nm. However, when I try to perform a normal mode analysis, it
complains that the maximum energy is >30 kJ/mn.
Non-cutoff electrostatics used, forcing full Hessian format.
Allocating Hessian memory...
Maximum force: 3.91984e+01
Maximum force probably not small enough to ensure that you are in an
energy well. Be aware that negative eigenvalues may occur when the
resulting matrix is diagonalized.
Fix was to run with -nt 1, and then the maximum force was exactly the same.
Associated revisions
History
#1 Updated by Mark Abraham over 6 years ago
Thanks.
I imagine only Berk or Erik have any real idea how this works. I'll force some appropriate usage for 4.6.4 if there's no fix planned.
#2 Updated by David van der Spoel over 6 years ago
Is there a test set? I assume this is not done using the .gro output file from the minimization?
#3 Updated by Mark Abraham over 6 years ago
David van der Spoel wrote:
Is there a test set?
Ahahahaha :-)
(I have master-branch machinery to add lightweight versions of such tests mostly ready, but not yet fit for routine use. Some of Teemu's more recent stuff with options parsing will be very useful.)
I assume this is not done using the .gro output file from the minimization?
#4 Updated by David van der Spoel over 6 years ago
I meant: is there an example that shows this problem? It would be easier to work with Michael's example than cough up something myself.
#5 Updated by Michael Shirts over 6 years ago
- File test_benzene_min.sh test_benzene_min.sh added
- File benzene_solid_minfornm.mdp benzene_solid_minfornm.mdp added
- File benzene_solid_nm.mdp benzene_solid_nm.mdp added
- File benzene_256.top benzene_256.top added
- File benzene_p2_256_minfornm.gro benzene_p2_256_minfornm.gro added
#6 Updated by Michael Shirts over 6 years ago
Test case uploaded. Run the script with changing the number of threads. When the number of threads is 1, the force in the normal modes calc equals the force after minimization. When not, it doesn't. Restart is done with .trr.
#7 Updated by David van der Spoel over 6 years ago
Hi Michael,
benzene.itp is missing...
#8 Updated by David van der Spoel over 6 years ago
OK nevermind, I fixed a itp file myself and have reproduced the problem.
#9 Updated by David van der Spoel over 6 years ago
Potential fix uploaded: https://gerrit.gromacs.org/#/c/2549/ but not tested more than for reproducing the EM energy (which it does now). There may still be other reasons why parallel NM does not work whatsoever.
#10 Updated by Berk Hess over 6 years ago
Can someone attach a OPLS benzene.itp?
I tested with my own methanol system and I can't reproduce this issue.
#12 Updated by Berk Hess over 6 years ago
Never mind.
I used Michael's mdp file and reproduced the issue. The problem is with PME. I assume some PME component is added multiple times.
#13 Updated by Berk Hess over 6 years ago
- Status changed from New to Fix uploaded
- Assignee changed from Mark Abraham to Berk Hess
NM parallelizes over gradient components (no particle/domain decomposition). This means every MPI rank does a separate force calculation.
However, PME was still initialized (on every rank) with a parallel setup.
I assume 4.5 was also affected by this. I uploaded a proper fix.
#14 Updated by Berk Hess over 6 years ago
- Status changed from Fix uploaded to Resolved
- % Done changed from 0 to 100
Applied in changeset 7b5c0b8343190b55bcdfa6e88036b51ae31c7afc.
#15 Updated by Mark Abraham about 6 years ago
- Status changed from Resolved to Closed
fixed parallel normal modes with PME
When doing a normal mode calculation with PME and (thread-)MPI,
the PME forces were incorrect. Also fixed some EM/NM output layout.
Fixes #1308
Change-Id: Ia7862fa62e235336c546824afdcbe28f37b145c5