Hi,
I am trying to match PDB records with results from dimplot.
I have managed to create a dictionary : pdb[chain][residue][residue_no]
Now I have some data in folders for each PDB, I am interested in parsing a particular file whose contents are shown below: for eg
pdb1aut: chains L and C
                                             Hydrogen bonds  Non-bonded
               Interacting residues          M-M   S-S   M-S  contacts
          ------------------------------     ---   ---   ---    -----  
Residues: [HIS  107  L] -> [PHE  208  C]      0     0     0        2
Residues: [PRO  144  L] -> [TRP  207  C]      0     0     0        1
Residues: [GLY  142  L] -> [TRP  207  C]      1     0     0        3
Now I want to match the residue details from dic created above and make: pdb[chain][residue][residue_no][M-M][S-S][M-S][non-bonded contacts]
i also need to count the number of such interactions for eg: TRP 207 C comes in line 2 and 3 both, so I need to add number of M-M interactions etc.
I still havenot written a code and I cant do anything complicated since I am a newbie in python.
One thing that would be nice is to show us your code so far. Making a dictionary that is nested that far is also a bad idea. It may be a better idea to build a class to hold the information for each residue.