24小时热门版块排行榜    

查看: 2381  |  回复: 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)

我们都爱小木虫

相关版块跳转 我要订阅楼主 蓝紫色玻璃心 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 函评 +3 布布和一二 2026-06-13 3/150 2026-06-13 23:35 by 芋圆香飘飘
[硕博家园] T^T +6 m584r2z4j3 2026-06-11 7/350 2026-06-13 23:10 by 3eaav2pea1
[找工作] 售SCI文章,我:8.O.5.51O.5.4,科目齐全,可十急 +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 19:07 by 1js5n6upxm
[公派出国] +4 q1zg6x4lf3 2026-06-12 4/200 2026-06-13 19:05 by 1js5n6upxm
[公派出国] T^T +5 q1zg6x4lf3 2026-06-12 5/250 2026-06-13 18:53 by lkmi35jdzt
[考博] π_π +4 m584r2z4j3 2026-06-11 4/200 2026-06-13 18:25 by lkmi35jdzt
[考研] o&gt;_&lt;o +5 m584r2z4j3 2026-06-11 5/250 2026-06-13 18:22 by lkmi35jdzt
[考博] T^T +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 14:45 by 80j16ujcu8
[考博] T^T +4 jk31rb6vyz 2026-06-12 4/200 2026-06-13 12:09 by 80j16ujcu8
[考博] T^T +3 m584r2z4j3 2026-06-11 3/150 2026-06-13 12:04 by 80j16ujcu8
[找工作] 售SCI文章,我:8.O.5.51O.5.4,科目齐全,可十急 +4 q1zg6x4lf3 2026-06-12 4/200 2026-06-13 08:53 by t4hz8376wy
[考博] →_→ +3 q1zg6x4lf3 2026-06-12 3/150 2026-06-13 08:49 by t4hz8376wy
[找工作] *囍 +3 m584r2z4j3 2026-06-12 3/150 2026-06-13 08:29 by t4hz8376wy
[论文投稿] →_→ +5 m584r2z4j3 2026-06-11 5/250 2026-06-13 08:13 by t4hz8376wy
[基金申请] 面上项目没有好文章就没希望了吗? +19 1234567wang 2026-06-07 21/1050 2026-06-12 21:24 by littlezl
[考博] [急招]吉林大学招收26年9月入学考核制博士生1名,截止今晚24点前 +3 hehejin 2026-06-10 4/200 2026-06-12 18:24 by 冻雨天
[教师之家] 重庆理工大学副校长遇刺身亡 传涉案副教授疑因积怨行凶 +6 yexuqing 2026-06-07 7/350 2026-06-12 16:46 by wwwkkk83
[教师之家] AASSDDFF +3 m584r2z4j3 2026-06-11 3/150 2026-06-12 11:28 by zs48m4lz8g
[考博] 还有课题组有博士名额吗 +5 冻雨天 2026-06-07 6/300 2026-06-08 20:59 by RCS_tyro
[考博] 博士申请 +3 张城斐 2026-06-07 3/150 2026-06-08 09:15 by A大朋同学
信息提示
请填处理意见