24小时热门版块排行榜    

Znn3bq.jpeg
查看: 2374  |  回复: 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)

我们都爱小木虫

相关版块跳转 我要订阅楼主 蓝紫色玻璃心 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 1rx34o113h 2026-05-23 3/150 2026-05-24 17:41 by 0i3mu4vkjz
[基金申请] 评审有感 +16 popular289 2026-05-18 27/1350 2026-05-24 17:34 by hhs666
[教师之家] 论文撤稿了 +4 bjvtcliu 2026-05-24 7/350 2026-05-24 17:29 by bjvtcliu
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 hvkbtfonbv 2026-05-23 4/200 2026-05-24 17:21 by 75ui6h7z2t
[博后之家] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 hvkbtfonbv 2026-05-23 3/150 2026-05-24 17:10 by 75ui6h7z2t
[考博] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 hvkbtfonbv 2026-05-23 3/150 2026-05-24 17:01 by 75ui6h7z2t
[考研] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 a2tycdlnq1 2026-05-23 5/250 2026-05-24 16:21 by hhx1yx9evi
[论文投稿] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 a2tycdlnq1 2026-05-23 4/200 2026-05-24 16:16 by hhx1yx9evi
[基金申请] 河北省自然科学基金 +6 Peterchao 2026-05-18 9/450 2026-05-24 16:02 by 130067131
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 pmo95bazuy 2026-05-23 8/400 2026-05-24 15:56 by 1uy1ht2y9r
[教师之家] 某211大学教师把个人教师官方主页改成:我跑了我跑了我跑了!官宣跑路! +4 zju2000 2026-05-21 5/250 2026-05-24 09:35 by songwz
[考博] 26/27申博自荐 10+4 ZXW0202 2026-05-22 9/450 2026-05-24 08:47 by bjvtcliu
[考博] 博士申请 +3 焦晓明 2026-05-21 3/150 2026-05-23 11:26 by mlc840311
[论文投稿] 投稿求助,期刊 +4 希冀,有书读 2026-05-20 8/400 2026-05-22 10:16 by 希冀,有书读
[文学芳草园] 献血感触 +7 呀呀好傻 2026-05-19 13/650 2026-05-21 20:15 by 呀呀好傻
[基金申请] 国自然评分 +4 无名者登山 2026-05-20 5/250 2026-05-21 16:35 by swuq
[基金申请] 国自然上会要求 +7 无名者登山 2026-05-18 11/550 2026-05-21 15:50 by draco1987
[基金申请] 提交了我也来说说感想 +9 fummck 2026-05-20 10/500 2026-05-21 14:17 by draco1987
[考博] 如果工作了想读博,可以边工作边读全日制嘛? 30+3 铁达火车 2026-05-18 5/250 2026-05-20 09:33 by tfang
[考博] 博士申请 +5 星…… 2026-05-18 6/300 2026-05-18 23:49 by 糊糊涂涂好
信息提示
请填处理意见