Eneergy minimization crashes due to vsites
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]
But rather it seems that the forces work on the vsites as well.
To reproduce, unpack the zip file and run
#2 Updated by Berk Hess over 2 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.