24小时热门版块排行榜    

查看: 307  |  回复: 0

zhuimeng08

银虫 (正式写手)

[交流] 求大神给出下面脚本语言的解释

求大神给出下面脚本语言的解释,学化学的,看不懂是什么意思!
谢谢!
#set c [measure center $mall]
#set vec [vecinvert $c]
#$mall moveby $vec
set minmax [measure minmax $mall]
set min [lindex $minmax 0]
set max [lindex $minmax 1]
set minx [lindex $min 0]
set miny [lindex $min 1]
set maxx [lindex $max 0]
set maxy [lindex $max 1]

set lipids [atomselect top "resname $LipResName"]
$lipids set segname [$lipids get resid]
set firstLipidSeg [lindex [$lipids get resid] 0]

set protein [atomselect top "not resname $LipResName"]

set Nlip [[atomselect top "name $P_name"] num]
puts "Number of lipids is $Nlip"
# Find number of atoms in one lipid
set lipSize [[atomselect top "resname $LipResName and segname $firstLipidSeg"] num]
puts "Number of atoms in one lipid is $lipSize"
(特别是下面几行,是什么意思)
# Cycle over all lipids
for {set i $firstLipidSeg} {$i<=[expr $firstLipidSeg+$Nlip]} {incr i} {
# How many atoms overlap with protein?
set over [atomselect top "segname $i and ( (x < ($minx + $xn))or (x > ($maxx + $xp)) or (y < ($miny + $yn)) or (y > ($maxy + $yp)))"]
puts "Lipid $i overlap - [$over num] atoms"
if {[$over num] > [expr $lipSize*$remove_crit]} {
  # Mark lipid as bad
  [atomselect top "resname $LipResName and segname $i"] set beta -1
}
}
[atomselect top "beta>=0"] writepdb $ResFile
mol delete all
set id2 [mol new $ResFile]
mol delrep 0 top
(到这里,这是重点部分,谢谢!)
#mol selection "protein"
#mol rep NewCartoon
#mol color colorID 15
#mol addrep top
mol selection "not protein"
mol rep Lines
mol color Name
mol addrep top
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 zhuimeng08 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见