This script when it is run in a clustering directory


In [ ]:
import IMP
import IMP.pmi
import IMP.pmi.analysis

model=IMP.Model()
rmf_file='0.rmf3'
frame_number=0
prot=IMP.pmi.analysis.get_hier_from_rmf(model,frame_number,rmf_file)



cm=IMP.pmi.analysis.CrossLinkTable()

# Since the protein names and the residue numbers are retrieved from the stat file,
# you have to provide the positions within the key of the corresponding fields
# after splitting at every "_" , "-" and ":"
# example key ISDCrossLinkMS_Distance_intrarb_937-State:0-108:PROT1_55:PROT2-1-1-0.1_None
# resid1 = 6 , chain1 = 7 , resid2 = 8 , chain2 = 9

namemap={}
namemap["Protein1"]=7
namemap["Protein2"]=9
namemap["Residue1"]=6
namemap["Residue2"]=8


cm.set_crosslinks("stat.out",search_label='ISDCrossLinkMS_Distance_',mapping=namemap)
cm.set_hierarchy(prot)
cm.plot(filename="xl_all")