0

我是 tcl 的新手。我有基础,但我希望能变得更好。我有一个要从分子中选择以进行可视化的 id 列表的列表。我想对从每个列表生成的每个代表应用不同的颜色。我有以下内容:

mol new myfile.pdb
#ids for selection to create representations
set myids {{10 20} {22 40}}
set index 0
foreach id $myids {
    incr ::index
    set id1 [lindex $id 0]
    set id2 [lindex $id 1]
    mol selection "name protein and resid > $id1 and resid < $id2"
    mol modstyle 0 0 NewCartoon
    mol modcolor 0 0 ColorID [expr $index + 1]
    mol addrep 0
}

这给了我整个分子的输出。我希望保留基本 mol 视图,但在其顶部显示选择。它还生成一种颜色而不是 2 种不同的颜色,因为有 2 个列表用于 2 种不同的表示。我希望所有选定的代表都保留。可以在这里使用 atomselect 吗?我需要把它放在一个proc中吗?我觉得我不应该按摩尔着色,而是按选择着色。我不确定如何进行。任何指针都会有所帮助

4

0 回答 0