首先简单测试了一下Tcl(目前还不包括分布的),是没有问题的,计算量巨大。
#---------------------------------------------------
set outfile [open distance.dat w]
set select1 "name OW"
set select2 "name HW1"
#---------------------------------------------------
set sel1 [atomselect top "$select1"]
set sel2 [atomselect top "$select2"]
set l1 [$sel1 get index]
set l2 [$sel2 get index]
foreach ind1 $l1 {
foreach ind2 $l2 {
if {$ind1 != $ind2} {
set tmp [list $ind1 $ind2]
set result [measure bond $tmp]
puts "$ind1 $ind2 $result"
} else {
puts "$ind1 $ind2 0"
}
}
}
于是准备添加设置条件,在select1周围10埃内的计算OW和HW1键长。set sel2 [atomselect top {"$select2" and within 10 of "$select1"}] 和 setset sel2 [atomselect top "same residue as {"$select2" within 10 of "$select1"}"] 语句都不可以,请求大神指导一二 作者Author: sobereva 时间: 2021-9-16 08:34
不要用花括号
花括号使得里面的内容保持原样,即会导致里面的诸如$select2变量无法转化成相应的选择语句作者Author: ZZU_SCU 时间: 2021-9-16 12:30