Project

General

Profile

Bug #608

Molecules with large charge groups give wrong neighborlist

Added by David van der Spoel almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Created an attachment (id=563)
Files to reproduce the problem

Molecules with large charge groups give wrong neighborlist. Without charge group the number of interactions is too low (569 iso 620). The molecule is larger than 32 atoms which lead to a grompp note, but no fatal error, as it used to be.

To reproduce:

grompp -p topology_one_chgrp -o topology_one_chgrp
mdrun -v -s topology_one_chgrp -g topology_one_chgrp

grompp -p topology_one_chgrp_per_atom -o topology_one_chgrp_per_atom
mdrun -v -s topology_one_chgrp_per_atom -g topology_one_chgrp_per_atom

diff topology_one_chgrp_per_atom.log topology_one_chgrp.log

cgbug.tar.gz (10.2 KB) cgbug.tar.gz Files to reproduce the problem David van der Spoel, 11/02/2010 02:16 PM
topology_two_chgrp.top (38.3 KB) topology_two_chgrp.top Additional topology file David van der Spoel, 11/02/2010 02:28 PM

History

#1 Updated by David van der Spoel almost 9 years ago

Created an attachment (id=564)
Additional topology file

The attached top file where there are two charge groups of 20 and 21 atoms respectively gives the correct result. This strongly suggests that the 32 atom/charge group limit is the cause of the problem.

#2 Updated by David van der Spoel almost 9 years ago

Oh and by the way the bug is present in 4.5.x as well, and even in 3.3.3.

The bug is definitely to do with 32 atoms/charge group. If I rearrange the topology_two_chrp.top to have 32+9 atoms it works, if I use 33+8 atoms it gives the wrong result.

In ns.c the setexcl routine simply bitmasks a field corresponding to the 33rd position in a variable bexcl that is an array of unsigned long (t_excl). Somehow the check for charge groups larger than 32 atoms has disappeared. I forgot whether it was in mdrun or in grompp. But it should be disallowed. Preferably in grompp.

#3 Updated by David van der Spoel almost 9 years ago

Fixed in release-4-0-patches with commit 3d11968.
Fixed in release-4-5-patches with commit 6ed9a83.

The two release have grown apart too much.

#4 Updated by Berk Hess almost 9 years ago

I fixed this checking properly with a single definition of this 32 atom number
for both grompp and mdrun in the release-4-5-patches branch:
commit 6029155500ce981785e95f4c179ba03689fbb4e9

Berk

Also available in: Atom PDF