Project

General

Profile

Bug #2444

Eneergy minimization crashes due to vsites

Added by David van der Spoel over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Category:
mdrun
Target version:
Affected version - extra info:
Has probably never worked.
Affected version:
Difficulty:
uncategorized
Close

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

embug.zip (279 KB) embug.zip David van der Spoel, 03/13/2018 08:00 AM

History

#1 Updated by Berk Hess over 1 year 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 over 1 year 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 over 1 year ago

Created a task do decide about adding checks: #2445

Also available in: Atom PDF