Project

General

Profile

Bug #75

wrong behavior of 'cgnr' in [atoms] section

Added by Marcelo Carignano over 13 years ago. Updated over 13 years ago.

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

Description

the 'chnr' column in the [ atoms ] section wrongly affect the calculation of the
Coulombic interaction.

I am providing files to reproduce the behavior.
These files are:
1. grompp.mdp
2. conf.gro
3. topol1.top
4. topol2.top

The system consists of two NH3 molecules, and all the interaction parameters are
included in 'topol1.top' or 'topol2.top'
The difference between these two topology files is that in one all chnr are set
to 1 and the other all the cgnr are different (1234).
The cut-off for the Coulombic interactions are set at 3.0 nm
The separation between the molecules is about 1 nm
The box size is 20 nm.

To reproduce the bug run grompp and the mdrun using the two different topol.top
files.

The Coulombic interactions, that should be the same in the two cases, are indeed
quite different.

Files:
1. grompp.mdp

; VARIOUS PREPROCESSING OPTIONS
title = test
cpp = /usr/bin/cpp
include =
define =

integrator = md
tinit = 0
dt = 0.001
nsteps = 1

nstlist = 10
ns_type = grid
pbc = xyz
rlist = 3.0

; OPTIONS FOR ELECTROSTATICS AND VDW
; Method for doing electrostatics
coulombtype = Cut-off
rcoulomb = 3.0
epsilon_r = 1
vdw-type = Cut-off
rvdw = 3.0

Tcoupl = no
Pcoupl = no
gen_vel = yes
gen_temp = 220.
gen_seed = 173529

constraints = all-angles
constraint-algorithm = shake


2. conf.gro

test
8
1NH3 N0 1 1.644 0.519 1.853
1NH3 H1 2 1.729 0.548 1.808
1NH3 H2 3 1.657 0.422 1.880
1NH3 H3 4 1.637 0.572 1.939
2NH3 N0 5 2.104 0.086 1.075
2NH3 H1 6 2.115 -0.006 1.035
2NH3 H2 7 2.071 0.072 1.170
2NH3 H3 8 2.196 0.126 1.083
20. 20. 20.

3. topol1.top

[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 2 yes 1.0 1.0

[ atomtypes ]
;name at.num mass charge ptype V W
N 7 14.00670 -1.026 A 0.336 0.87864
HN 1 1.00800 0.342 A 0. 0.

; define the NH3 model
[ moleculetype ]
; molname nrexcl
NH3 2

[ atoms ]
; nr type resnr residue atom cgnr charge mass
1 N 1 NH3 N0 1 -1.026 14.00670
2 HN 1 NH3 H1 1 0.342 1.00800
3 HN 1 NH3 H2 1 0.342 1.00800
4 HN 1 NH3 H3 1 0.342 1.00800

[ constraints ]
; i j funct distance
1 2 1 0.10124 ; N - H1
1 3 1 0.10124 ; N - H2
1 4 1 0.10124 ; N - H3
2 3 1 0.162417 ; H1 - H2
2 4 1 0.162417 ; H1 - H3
3 4 1 0.162417 ; H1 - H3

[ system ]

[ molecules ]
NH3 2


4. topol2.top

[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 2 yes 1.0 1.0

[ atomtypes ]
;name at.num mass charge ptype V W
N 7 14.00670 -1.026 A 0.336 0.87864
HN 1 1.00800 0.342 A 0. 0.

; define the NH3 model
[ moleculetype ]
; molname nrexcl
NH3 2

[ atoms ]
; nr type resnr residue atom cgnr charge mass
1 N 1 NH3 N0 1 -1.026 14.00670
2 HN 1 NH3 H1 2 0.342 1.00800
3 HN 1 NH3 H2 3 0.342 1.00800
4 HN 1 NH3 H3 4 0.342 1.00800

[ constraints ]
; i j funct distance
1 2 1 0.10124 ; N - H1
1 3 1 0.10124 ; N - H2
1 4 1 0.10124 ; N - H3
2 3 1 0.162417 ; H1 - H2
2 4 1 0.162417 ; H1 - H3
3 4 1 0.162417 ; H1 - H3

[ system ]

[ molecules ]
NH3 2

History

#1 Updated by Erik Lindahl over 13 years ago

Hi David, I noted that you already replied to it on the list, so it's all yours if you want :-)

#2 Updated by Berk Hess over 13 years ago

The problem is that NH3 all one charge group
is recognized as TIP4P water and therefore optimized,
while the N does have charge and the waterloops
assume it does not.

The solvent check in mdrun should check for 0 charge
of the first atom for tip4p optimization.

#3 Updated by Berk Hess over 13 years ago

Fixed

#4 Updated by Marcelo Carignano over 13 years ago

(In reply to comment #3)

Fixed

I'm affraid I don't understand a bit here. So my only solution is to use the
1234 chnr version of topol.top? This results in incorrect treatment of the cutoff.
Or is there a corrected source that I could compile ans use the all 1 charge group?

Thank you, Marcelo Carignano

Also available in: Atom PDF