Molecules with large charge groups give wrong neighborlist
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.
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
#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.