Pdb2gmx deleting duplicate atoms

GROMACS version: 2018
GROMACS modification: No

I am a new GROMACS user and i am trying to convert my pdb file into a gro file with pdb2gmx. However, my molecule is a dimer and therefore when using pdb2gmx, the command deletes duplicate atoms which essentially removes half of my molecule. Is there a way to prevent the deleting of duplicate atoms by pdb2gmx? Thank you

Do you mean you are converting from one coordinate file type to another? In that case, simply use gmx editconf

Or are you generating the topology for the molecule? In that case convert the resulting .top file you get into a .itp file, then #include it within your over all system topology file. That is actually the better way to do things when you have multiple molecules of the same type within a coordinate file.

Understood. Would this method using the generated .top file and converting it into a .itp file be better than using -chainsep or -merge? Additionally, how does one convert a .top file into a .itp file??

Thank you very much for you help

No idea, never used those functions.

http://manual.gromacs.org/documentation/current/reference-manual/file-formats.html#top

In that example posted there you would make an urea.itp file with the following contents:

[ moleculetype ]
; name nrexcl
Urea 3

[ atoms ]
; nr type resnr residu atom cgnr charge
1 C 1 UREA C1 1 0.683
2 O 1 UREA O2 1 -0.683
3 NT 1 UREA N3 2 -0.622
4 H 1 UREA H4 2 0.346
5 H 1 UREA H5 2 0.276
6 NT 1 UREA N6 3 -0.622
7 H 1 UREA H7 3 0.346
8 H 1 UREA H8 3 0.276

[ bonds ]
; ai aj funct c0 c1
3 4 1 1.000000e-01 3.744680e+05
3 5 1 1.000000e-01 3.744680e+05
6 7 1 1.000000e-01 3.744680e+05
6 8 1 1.000000e-01 3.744680e+05
1 2 1 1.230000e-01 5.020800e+05
1 3 1 1.330000e-01 3.765600e+05
1 6 1 1.330000e-01 3.765600e+05

[ pairs ]
; ai aj funct c0 c1
2 4 1 0.000000e+00 0.000000e+00
2 5 1 0.000000e+00 0.000000e+00
2 7 1 0.000000e+00 0.000000e+00
2 8 1 0.000000e+00 0.000000e+00
3 7 1 0.000000e+00 0.000000e+00
3 8 1 0.000000e+00 0.000000e+00
4 6 1 0.000000e+00 0.000000e+00
5 6 1 0.000000e+00 0.000000e+00

[ angles ]
; ai aj ak funct c0 c1
1 3 4 1 1.200000e+02 2.928800e+02
1 3 5 1 1.200000e+02 2.928800e+02
4 3 5 1 1.200000e+02 3.347200e+02
1 6 7 1 1.200000e+02 2.928800e+02
1 6 8 1 1.200000e+02 2.928800e+02
7 6 8 1 1.200000e+02 3.347200e+02
2 1 3 1 1.215000e+02 5.020800e+02
2 1 6 1 1.215000e+02 5.020800e+02
3 1 6 1 1.170000e+02 5.020800e+02

[ dihedrals ]
; ai aj ak al funct c0 c1 c2
2 1 3 4 1 1.800000e+02 3.347200e+01 2.000000e+00
6 1 3 4 1 1.800000e+02 3.347200e+01 2.000000e+00
2 1 3 5 1 1.800000e+02 3.347200e+01 2.000000e+00
6 1 3 5 1 1.800000e+02 3.347200e+01 2.000000e+00
2 1 6 7 1 1.800000e+02 3.347200e+01 2.000000e+00
3 1 6 7 1 1.800000e+02 3.347200e+01 2.000000e+00
2 1 6 8 1 1.800000e+02 3.347200e+01 2.000000e+00
3 1 6 8 1 1.800000e+02 3.347200e+01 2.000000e+00

[ dihedrals ]
; ai aj ak al funct c0 c1
3 4 5 1 2 0.000000e+00 1.673600e+02
6 7 8 1 2 0.000000e+00 1.673600e+02
1 3 6 2 2 0.000000e+00 1.673600e+02

Then you will have the following in the .top file:

; Example topology file
;
[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
1 1 no 1.0 1.0

; The force field files to be included
#include “rt41c5.itp”

; The urea .itp file to include
#include “urea.itp”

; Include SPC water topology
#include “spc.itp”

[ system ]
Urea in Water

[ molecules ]
Urea 1
SOL 1000

1 Like

Knew it was somewhere, here is the explanation of how .top and .itp files work and their definitions: http://manual.gromacs.org/documentation/current/reference-manual/topologies/topology-file-formats.html