Python Pymol:对特定链上的残留物使用cmd.color命令

Python Pymol:对特定链上的残留物使用cmd.color命令,python,pymol,Python,Pymol,我一直无法仅对Pymol中特定链的剩余部分着色。对不起,这似乎是一个明确的初学者问题 到目前为止,我只能对所有链上具有特定值(例如141)的所有残留物着色 #I want to colour residue 141 on chain D blue. first_res = 141 color("blue", 'resi ' + first_res) 要从特定链中选择残留物,只需添加“and chain…”,如下所示: cmd.color("blue", 'resi ' + first_res

我一直无法仅对Pymol中特定链的剩余部分着色。对不起,这似乎是一个明确的初学者问题

到目前为止,我只能对所有链上具有特定值(例如141)的所有残留物着色

#I want to colour residue 141 on chain D blue.
first_res = 141
color("blue", 'resi ' + first_res)

要从特定链中选择残留物,只需添加“and chain…”,如下所示:

cmd.color("blue", 'resi ' + first_res + ' and chain ' + first_chain))