Bug #2444
Eneergy minimization crashes due to vsites
Description
EM for a simple 4 atom compound with a vsite crashes with a segmentation violation, probably due to infinite forces. The problem could be related to the compound having a virtual site. Example attached.
Upon inspection of minimize.cpp it seems vsites are not taking into account in do_em_step, where I would expect the following code
for i in atoms:
x[i] = x[i] + k f[i]
generate_vsites()
evaluate_energy()
spread_vsites
But rather it seems that the forces work on the vsites as well.
To reproduce, unpack the zip file and run
gmx grompp
gmx mdrun
History
#1 Updated by Berk Hess almost 3 years ago
You have co-linear atoms, but request an out of plane vsite, that can't work.
But indeed the vsite force spreading seems to be missing, we should dd that.
#2 Updated by Berk Hess almost 3 years ago
- Status changed from New to Rejected
I should have said: "out of line vsite".
And the forces are actually spread, inside the do_force call.
There is the more fundamental issue if we should check for all possible incompatible user input. It would be nice to check at least the starting structure for overlapping atoms etc, to avoid floating point exceptions and crashes. But that requires many checks in many kernels and for performance reasons we likely do not want these at every force evaluation of a normal MD run.
#3 Updated by Berk Hess almost 3 years ago
Created a task do decide about adding checks: #2445