Hello,
I am currently using pmx to create hybrid topologies and ran into an list index error:
IndexError: list index out of range
I used ligandHybrid from pmx:
pmx ligandHybrid -i1 t1.pdb -i2 t2.pdb -itp1 t1.itp -itp2 t2.itp -pairs pairs2.dat
It was recommended from the other topics to swap the inputs, which resulted in the same list index error:
pmx ligandHybrid -i1 t2.pdb -i2 t1.pdb -itp1 t2.itp -itp2 t1.itp -pairs pairs2.dat
The itp files look like this:
t1:
; Created by cgenff_charmm2gmx.py
[ moleculetype ]
; Name nrexcl
SAMPLmol.pdb 3
[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
; residue 1 SAMPLmol.pdb rtp SAMPLmol.pdb q qsum
1 OG311 1 SAMPLmol.pdb O1 1 -0.537 15.999 ;
2 CG2R61 1 SAMPLmol.pdb C1 2 0.419 12.011 ;
3 CG2R61 1 SAMPLmol.pdb C2 3 -0.120 12.011 ;
4 CG2R61 1 SAMPLmol.pdb C3 4 -0.107 12.011 ;
5 CG2R61 1 SAMPLmol.pdb C4 5 -0.009 12.011 ;
6 CG2R61 1 SAMPLmol.pdb C5 6 -0.114 12.011 ;
7 CG2R61 1 SAMPLmol.pdb C6 7 -0.110 12.011 ;
8 CG2R61 1 SAMPLmol.pdb C7 8 -0.104 12.011 ;
9 CG2R61 1 SAMPLmol.pdb C8 9 -0.132 12.011 ;
10 CG2R61 1 SAMPLmol.pdb C9 10 0.294 12.011 ;
11 NG2R60 1 SAMPLmol.pdb N1 11 -0.590 14.007 ;
12 HGP1 1 SAMPLmol.pdb H1 12 0.420 1.008 ;
13 HGR61 1 SAMPLmol.pdb H2 13 0.115 1.008 ;
14 HGR61 1 SAMPLmol.pdb H3 14 0.115 1.008 ;
15 HGR61 1 SAMPLmol.pdb H4 15 0.115 1.008 ;
16 HGR61 1 SAMPLmol.pdb H5 16 0.115 1.008 ;
17 HGR61 1 SAMPLmol.pdb H6 17 0.115 1.008 ;
18 HGR61 1 SAMPLmol.pdb H7 18 0.115 1.008 ;
[ bonds ]
; ai aj funct c0 c1 c2 c3
1 2 1
1 12 1
2 3 1
2 11 1
3 4 1
3 13 1
4 5 1
4 14 1
5 10 1
5 6 1
6 15 1
6 7 1
7 16 1
7 8 1
8 9 1
8 17 1
9 10 1
9 18 1
10 11 1
[ pairs ]
; ai aj funct c0 c1 c2 c3
1 10 1
1 4 1
1 13 1
2 9 1
2 5 1
2 14 1
3 10 1
3 12 1
3 6 1
4 9 1
4 11 1
4 7 1
4 15 1
5 8 1
5 13 1
5 18 1
5 16 1
6 9 1
6 17 1
6 11 1
6 14 1
7 10 1
7 18 1
8 11 1
8 15 1
9 16 1
10 14 1
10 15 1
10 17 1
11 12 1
11 13 1
11 18 1
13 14 1
15 16 1
16 17 1
17 18 1
[ angles ]
; ai aj ak funct c0 c1 c2 c3
2 1 12 5
1 2 3 5
1 2 11 5
3 2 11 5
2 3 4 5
2 3 13 5
4 3 13 5
3 4 5 5
3 4 14 5
5 4 14 5
10 5 4 5
10 5 6 5
4 5 6 5
5 6 15 5
5 6 7 5
15 6 7 5
16 7 6 5
16 7 8 5
6 7 8 5
9 8 17 5
9 8 7 5
17 8 7 5
10 9 18 5
10 9 8 5
18 9 8 5
9 10 11 5
9 10 5 5
11 10 5 5
2 11 10 5
[ dihedrals ]
; ai aj ak al funct c0 c1 c2 c3 c4 c5
12 1 2 3 9
12 1 2 11 9
1 2 3 4 9
1 2 3 13 9
11 2 3 4 9
11 2 3 13 9
1 2 11 10 9
3 2 11 10 9
2 3 4 5 9
2 3 4 14 9
13 3 4 5 9
13 3 4 14 9
3 4 5 10 9
3 4 5 6 9
14 4 5 10 9
14 4 5 6 9
4 5 10 9 9
4 5 10 11 9
6 5 10 9 9
6 5 10 11 9
10 5 6 15 9
10 5 6 7 9
4 5 6 15 9
4 5 6 7 9
5 6 7 16 9
5 6 7 8 9
15 6 7 16 9
15 6 7 8 9
16 7 8 9 9
16 7 8 17 9
6 7 8 9 9
6 7 8 17 9
17 8 9 10 9
17 8 9 18 9
7 8 9 10 9
7 8 9 18 9
18 9 10 11 9
18 9 10 5 9
8 9 10 11 9
8 9 10 5 9
9 10 11 2 9
5 10 11 2 9
t2:
; Created by cgenff_charmm2gmx.py
[ moleculetype ]
; Name nrexcl
SAMPLmol.pdb 3
[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
; residue 1 SAMPLmol.pdb rtp SAMPLmol.pdb q qsum
1 OG2D4 1 SAMPLmol.pdb O1 1 -0.470 15.999 ;
2 CG2R63 1 SAMPLmol.pdb C1 2 0.183 12.011 ;
3 NG2R61 1 SAMPLmol.pdb N1 3 -0.286 14.007 ;
4 CG2R62 1 SAMPLmol.pdb C2 4 0.286 12.011 ;
5 CG2R62 1 SAMPLmol.pdb C3 5 -0.086 12.011 ;
6 CG2R61 1 SAMPLmol.pdb C4 6 -0.108 12.011 ;
7 CG2R61 1 SAMPLmol.pdb C5 7 -0.112 12.011 ;
8 CG2R61 1 SAMPLmol.pdb C6 8 -0.111 12.011 ;
9 CG2R61 1 SAMPLmol.pdb C7 9 -0.108 12.011 ;
10 CG2R62 1 SAMPLmol.pdb C8 10 -0.196 12.011 ;
11 CG2R62 1 SAMPLmol.pdb C9 11 -0.173 12.011 ;
12 HGP1 1 SAMPLmol.pdb H1 12 0.300 1.008 ;
13 HGR61 1 SAMPLmol.pdb H2 13 0.115 1.008 ;
14 HGR61 1 SAMPLmol.pdb H3 14 0.115 1.008 ;
15 HGR61 1 SAMPLmol.pdb H4 15 0.115 1.008 ;
16 HGR61 1 SAMPLmol.pdb H5 16 0.115 1.008 ;
17 HGR62 1 SAMPLmol.pdb H6 17 0.226 1.008 ;
18 HGR62 1 SAMPLmol.pdb H7 18 0.195 1.008 ;
[ bonds ]
; ai aj funct c0 c1 c2 c3
1 2 1
2 3 1
2 11 1
3 12 1
3 4 1
4 9 1
4 5 1
5 10 1
5 6 1
6 13 1
6 7 1
7 14 1
7 8 1
8 9 1
8 15 1
9 16 1
10 17 1
10 11 1
11 18 1
[ pairs ]
; ai aj funct c0 c1 c2 c3
1 4 1
1 18 1
1 12 1
1 10 1
2 9 1
2 17 1
2 5 1
3 8 1
3 18 1
3 16 1
3 6 1
3 10 1
4 7 1
4 11 1
4 13 1
4 15 1
4 17 1
5 8 1
5 12 1
5 14 1
5 16 1
5 18 1
6 9 1
6 17 1
6 11 1
6 15 1
7 10 1
7 16 1
8 13 1
9 12 1
9 14 1
9 10 1
10 13 1
11 12 1
13 14 1
14 15 1
15 16 1
17 18 1
[ angles ]
; ai aj ak funct c0 c1 c2 c3
1 2 3 5
1 2 11 5
3 2 11 5
12 3 2 5
12 3 4 5
2 3 4 5
9 4 3 5
9 4 5 5
3 4 5 5
10 5 4 5
10 5 6 5
4 5 6 5
13 6 5 5
13 6 7 5
5 6 7 5
14 7 6 5
14 7 8 5
6 7 8 5
9 8 15 5
9 8 7 5
15 8 7 5
16 9 4 5
16 9 8 5
4 9 8 5
17 10 11 5
17 10 5 5
11 10 5 5
2 11 18 5
2 11 10 5
18 11 10 5
[ dihedrals ]
; ai aj ak al funct c0 c1 c2 c3 c4 c5
1 2 3 12 9
1 2 3 4 9
11 2 3 12 9
11 2 3 4 9
1 2 11 18 9
1 2 11 10 9
3 2 11 18 9
3 2 11 10 9
12 3 4 9 9
12 3 4 5 9
2 3 4 9 9
2 3 4 5 9
3 4 9 16 9
3 4 9 8 9
5 4 9 16 9
5 4 9 8 9
9 4 5 10 9
9 4 5 6 9
3 4 5 10 9
3 4 5 6 9
4 5 10 17 9
4 5 10 11 9
6 5 10 17 9
6 5 10 11 9
10 5 6 13 9
10 5 6 7 9
4 5 6 13 9
4 5 6 7 9
13 6 7 14 9
13 6 7 8 9
5 6 7 14 9
5 6 7 8 9
14 7 8 9 9
14 7 8 15 9
6 7 8 9 9
6 7 8 15 9
15 8 9 16 9
15 8 9 4 9
7 8 9 16 9
7 8 9 4 9
17 10 11 2 9
17 10 11 18 9
5 10 11 2 9
5 10 11 18 9
[ dihedrals ]
; ai aj ak al funct c0 c1 c2 c3
2 11 3 1 2