24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 2354  |  回复: 0

蓝紫色玻璃心

新虫 (小有名气)

[求助] VMD分析残基RMSD

看网上说用VMD自带的rmsd-fullthrottle.tcl文件就可以对指定残基计算RMSD,但是这个文件不是很明白(对程序一点都不明白),想问一下有没有用这个程序计算RMSD的?我对这个文件里面应该修改什么?或者能不能给个具体步骤?一点头绪都没有!

# This script contains a procedure called rmsd_residue_over_time that calculates the average RMSD for each residue in a selection over all frames in a trajectory. The procedure is called as:
# rmsd_residue_over_time mol sel_resid
#where mol is the molecule in VMD and sel_resid is a list of the residue numbers in that selection.

#You can use the procedure for any residue or list of residues. Here, as an example, we will make a selection for all residues in the protein. Note that this will take a long time to calculate:

set sel_resid [[atomselect top "protein and alpha"] get resid]

#The procedure is presented below.  It also sets the B value to the value calculated, so you can color the protein by RMSD.  The call for the procedure is at the end of the file.

proc rmsd_residue_over_time {{mol top} res} {

    # use frame 0 for the reference
    set reference [atomselect 1 "protein" frame 0]
    # the frame being compared
    set compare [atomselect $mol "protein"]
    #make a selection with all atoms
    set all [atomselect top all]
    #get the number of frames
    set num_steps [molinfo $mol get numframes]
   
    foreach r $res {
        set rmsd($r) 0
    }
   
    #loop over all frames in the trajectory
    for {set frame 1} {$frame < $num_steps} {incr frame} {
        puts "Calculating rmsd for frame $frame ..."
        # get the correct frame
        $compare frame $frame
        # compute the transformation
        set trans_mat [measure fit $compare $reference]
        # do the alignment
        $all move $trans_mat
        # compute the RMSD
       
        #loop through all residues
        foreach r $res {
            set ref [atomselect $mol "chain U and resid $r and noh" frame 0]
            set comp [atomselect $mol "chain U and resid $r and noh" frame $frame]
            set rmsd($r) [expr $rmsd($r) + [measure rmsd $comp $ref]]
            $comp delete
            $ref delete
        }
    }
    set ave 0
        foreach r $res {
            set rmsd($r) [expr $rmsd($r)/$num_steps]
            # print the RMSD
            puts "RMSD of residue $r is $rmsd($r)"
            set res_b [atomselect $mol "resid $r"]
            $res_b set beta $rmsd($r)
            $res_b delete
            set ave [expr $ave + $rmsd($r)]
            
        }
    set ave [expr $ave/[llength $res]]
    puts " Average rmsd per residue:   $ave"
   
}

#Call the procedure

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

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 蓝紫色玻璃心 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 315求调剂 +10 欣喜777 2026-04-04 11/550 2026-04-05 12:55 by Hdyxbekcb
[考研] 一志愿9材料学硕297已过六级求调剂推荐 +10 adaie 2026-04-04 11/550 2026-04-05 12:28 by 418490947
[考研] 本科211,293分请求调剂 +7 莲菜就是藕吧 2026-04-03 8/400 2026-04-05 11:41 by arrow8852
[考研] 数一英一 347 人工智能国奖论文都有求调剂 +3 乌拉儿山脉 2026-03-30 7/350 2026-04-05 10:32 by zhq0425
[考研] 找调剂 +7 楚乔乔 2026-04-01 7/350 2026-04-05 09:07 by dick_runner
[考研] 285求调剂 +11 哦呦呼o 2026-04-04 11/550 2026-04-05 08:15 by 544594351
[考研] 求调剂 +7 xzghyuj 2026-04-04 7/350 2026-04-04 22:25 by oooqiao
[考研] 296材料专硕求调剂 +21 202451007219 2026-04-02 22/1100 2026-04-04 21:48 by hemengdong
[考研] 334求调剂 +8 曾仰之 2026-04-03 8/400 2026-04-04 11:16 by w_xuqing
[考研] 材料调剂 +11 吴棂颖! 2026-04-03 11/550 2026-04-04 09:56 by 小小树2024
[考研] 材料295 +13 小英11 2026-04-03 14/700 2026-04-04 09:02 by 来看流星雨10
[考研] 求材料调剂 一志愿南昌大学 328分 +5 yyy..... 2026-04-03 5/250 2026-04-03 13:46 by 百灵童888
[考研] 求调剂 +3 心想事成可 2026-04-03 3/150 2026-04-03 11:22 by wangjy2002
[考研] 338求调剂,一志愿能源动力,外语是日语203 +5 zzz,,r 2026-04-02 5/250 2026-04-03 09:45 by 蓝云思雨
[考研] 重庆大学材料与化工085600,初试370+,求求调剂建议 +8 shzhou_ 2026-04-01 9/450 2026-04-03 09:31 by 蓝云思雨
[考研] 一志愿华南师范大学-22408计算机-292分-求华南师范大学调剂 +4 爱读书的小鳄鱼 2026-04-02 4/200 2026-04-02 18:35 by 求调剂zz
[考研] 求调剂 +7 Aniyaio 2026-04-02 7/350 2026-04-02 16:42 by zzsw+
[考研] 材料工程322分 +8 哈哈哈吼吼吼哈 2026-04-01 8/400 2026-04-02 11:53 by 3041
[考研] 一志愿厦门大学化学工程(专硕)-数二英二406分-求调剂 +5 厦大化工 2026-04-01 5/250 2026-04-02 10:03 by jp9609
[考研] 考研调剂求助 +7 13287130938 2026-03-31 7/350 2026-03-31 16:39 by 690616278
信息提示
请填处理意见