[gmx-users] recovering topology from tpr

Rebeca García Fandiño regafan at hotmail.com
Thu Jan 22 12:11:54 CET 2015


Dear Gromacs users,
Is it posible to recover the topology files (itp or top) from a binary tpr file?

I have tried using this script:

https://pythonhosted.org/MDAnalysis/_modules/MDAnalysis/topology/TPRParser.html

However, the itp file seems a single line like this:

{'_bonds':
 [(0, 3), (0, 7), (0, 11), (0, 13), (0, 74), (0, 80), (1, 4), (1, 6), 
(1, 10), (1, 14), (1, 75), (2, 5), (2, 11), (2, 15), (2, 16), (2, 76), 
(3, 6), (3, 12), (3, 14), (3, 17), (3, 21), (4, 5), (4, 11), (4, 13), 
(4, 18), (4, 22), (4, 24), (5, 8), (5, 9), (5, 12), (5, 75), (6, 11), 
(6, 76), (7, 10), (10, 13), (10, 16), (10, 76), (16, 19), (16, 23), (16,
 25), (16, 27), (17, 20), (17, 22), (17, 24), (17, 28), (18, 21), (18, 
25), (18, 29), (18, 30), (19, 22), (19, 26), (19, 28), (19, 31), (19, 
35), (20, 21), (20, 25), (20, 27), (20, 32), (20, 36), (20, 38), (21, 
26), (22, 25), (23, 24), (24, 27), (24, 30), (30, 33), (30, 37), (30, 
39), (30, 41), (31, 34), (31, 36), (31, 38), (31, 42), (32, 35), (32, 
39), (32, 43), (32, 44), (33, 36), (33, 40), (33, 42), (33, 45), (33, 
49), (34, 35), (34, 39), (34, 41), (34, 46), (34, 50), (34, 52), (35, 
40), (36, 39), (37, 38), (38, 41), (38, 44), (44, 47), (44, 51), (44, 
53), (44, 55), (45, 48), (45, 50), (45, 52), (45, 56), (46, 49), (46, 
53), (46, 57), (46, 58), (47, 50), (47, 54), (47, 56), (47, 59), (47, 
63), (48, 49), (48, 53), (48, 55), (48, 60), (48, 64), (48, 66), (49, 
54), (50, 53), (51, 52), (52, 55), (52, 58), (58, 61), (58, 65), (58, 
67), (58, 69), (59, 62), (59, 64), (59, 66), (59, 70), (60, 63), (60, 
67), (60, 71), (60, 72), (61, 64), (61, 68), (61, 70), (61, 73), (61, 
77), (62, 63), (62, 67), (62, 69), (62, 74), (62, 78), (62, 80), (63, 
68), (64, 67), (65, 66), (66, 69), (66, 72), (72, 75), (72, 79), (72, 
81), (72, 83), (73, 76), (73, 78), (73, 80), (73, 84), (74, 77), (74, 
81), (74, 85), (75, 78), (75, 82), (75, 84), (76, 77), (76, 81), (76, 
83), (77, 82), (78, 81), (79, 80), (80, 83)], '_dihe': [], '_angles': 
[], '_atoms': [< Atom 1: name 'C1' of type 'CH1' of resname '2ACG', 
resid 0 and segid 'seg_0_A001'>, < Atom 2: name 'O5' of type 'OA' 
of resname '2ACG', resid 0 and segid 'seg_0_A001'>, < Atom 3: name
 'C5' of type 'CH1' of resname '2ACG', resid 0 and segid 
'seg_0_A001'>, < Atom 4: name 'C4' of type 'CH1' of resname 
'2ACG', resid 0 and segid 'seg_0_A001'>, < Atom 5: name 'O4' of 
type 'OA' of resname '2ACG', resid 0 and segid 'seg_0_A001'>, < 
Atom 6: name 'C2' of type 'CH1' of resname '2ACG', resid 0 and segid 
'seg_0_A001'>, < Atom 7: name 'O2' of type 'OE' of resname '2ACG',
 resid 0 and segid 'seg_0_A001'>, < Atom 8: name 'C7' of type 'C' 
of resname '2ACG', resid 0 and segid 'seg_0_A001'>, < Atom 9: name
 'O7' of type 'O' of resname '2ACG', resid 0 and segid 'seg_0_A001'>,
 < Atom 10: name 'C8' of type 'CH3' of resname '2ACG', resid 0 and 
segid 'seg_0_A001'>, < Atom 11: name 'C3' of type 'CH1' of resname
 '2ACG', resid 0 and segid 'seg_0_A001'>, < Atom 12: name 'O3' of 
type 'OA' of resname '2ACG', resid 0 and segid 'seg_0_A001'>, < 
Atom 13: name 'H3' of type 'H' of resname '2ACG', resid 0 and segid 
'seg_0_A001'>, < Atom 14: name 'C6' of type 'CH2' of resname 
'2ACG', resid 0 and segid 'seg_0_A001'>, < Atom 15: name 'O6' of 
type 'OA' of resname '2ACG', resid 0 and segid 'seg_0_A001'>, < 
Atom 16: name 'H6' of type 'H' of resname '2ACG', resid 0 and segid 
'seg_0_A001'>, < Atom 17: name 'C1' of type 'CH1' of resname 
'GCD', resid 1 and segid 'seg_0_A001'>, < Atom 18: name 'O5' of 
type 'OA' of resname 'GCD', resid 1 and segid 'seg_0_A001'>, < 
Atom 19: name 'C5' of type 'CH1' of resname 'GCD', resid 1 and segid 
'seg_0_A001'>, < Atom 20: name 'C4' of type 'CH1' of resname 
'GCD', resid 1 and segid 'seg_0_A001'>, < Atom 21: n(...)

Does anyone know about any alternative?

Thanks a lot for your help in advance.

Best wishes,

Rebeca

Dr. Rebeca Garcia
Santiago de Compostela University
Spain 		 	   		  


More information about the gromacs.org_gmx-users mailing list