24小时热门版块排行榜    

查看: 2445  |  回复: 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文章,我:8O.55.1.O.54,科目全,可伽急 +4 J9NGDvAaPB9L 2026-11-27 4/200 2026-11-27 14:23 by YGs3orGKTyBO
[论文投稿] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +4 J9NGDvAaPB9L 2026-11-26 4/200 2026-11-27 14:03 by aTZfRIGzowsS
[考博] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +4 N80hyqiqCeT2 2026-11-26 4/200 2026-11-27 13:52 by aTZfRIGzowsS
[考研] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 N80hyqiqCeT2 2026-11-26 4/200 2026-11-27 13:37 by aTZfRIGzowsS
[找工作] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +4 Gp6vMAD5C53H 2026-11-26 5/250 2026-11-27 13:30 by aTZfRIGzowsS
[考研] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 Gp6vMAD5C53H 2026-11-26 5/250 2026-11-27 13:19 by aTZfRIGzowsS
[考博] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 mzU8LdVQMwOf 2026-11-26 3/150 2026-11-27 13:17 by aTZfRIGzowsS
[找工作] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +5 mzU8LdVQMwOf 2026-11-26 7/350 2026-11-27 13:08 by aTZfRIGzowsS
[博后之家] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +5 mzU8LdVQMwOf 2026-11-26 7/350 2026-11-27 13:08 by aTZfRIGzowsS
[硕博家园] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +5 mzU8LdVQMwOf 2026-11-26 6/300 2026-11-27 12:53 by aTZfRIGzowsS
[考博] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +6 1VHV9UkX7sid 2026-11-26 9/450 2026-11-27 12:46 by aTZfRIGzowsS
[考研] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +4 1VHV9UkX7sid 2026-11-26 4/200 2026-11-27 12:38 by aTZfRIGzowsS
[教师之家] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +6 1VHV9UkX7sid 2026-11-26 6/300 2026-11-27 12:32 by aTZfRIGzowsS
[考博] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +6 1VHV9UkX7sid 2026-11-26 7/350 2026-11-27 12:24 by aTZfRIGzowsS
[硕博家园] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 kTIKZRt5HnP0 2026-11-27 3/150 2026-11-27 10:44 by I5Uih4YWUbaa
[文学芳草园] 做梦 +3 myrtle 2026-11-25 3/150 2026-11-27 09:14 by asi19
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 mzU8LdVQMwOf 2026-11-26 4/200 2026-11-27 08:52 by YSq3swkeEVgo
[公派出国] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +7 1VHV9UkX7sid 2026-11-26 11/550 2026-11-27 08:18 by YSq3swkeEVgo
[教师之家] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 Gp6vMAD5C53H 2026-11-26 3/150 2026-11-27 05:58 by p1TifTPkqG3A
[硕博家园] 博士申请求助 +3 nico77 2026-11-21 3/150 2026-11-26 16:18 by 13961805515
信息提示
请填处理意见