Entering edit mode
11.1 years ago
dave
•
0
I currently have a python script, which takes in a pdb file. I have associated a colour to a residue. Now what I want, and what I cannot do, is to run pymol and make my own method which can be run in pymol, where you type in the residue number and pymol colours it in that particular colour.
global resList
resList=[list of residues]
resultss = [list of colours associated with residue)
def colourapply(self,event):
def colourModel():
for i in range(len(resList)):
residueID = resList[i]
colour = results[i]
pymol.cmd.do("color "+colour+" , resi "+residueID)
pymol.cmd.extend("colourModel", colourModel)
This is what I have tried, but it doesn't work. What I want, for example is, if you call in pymol - colourModel resi 112, it then colours the resi 112 the particular colour it was assigned.