24小时热门版块排行榜    

查看: 1977  |  回复: 4

jianchaoyv

金虫 (小有名气)

[交流] 【讨论】关于不同z值处的水能形成氢键数的脚本讨论 已有3人参与

《转载》
氢键判据用的是常用的35度3.5埃的几何判据,当然也可以直接在脚本里改。计算方法是,只要有水分子有一个原子在某一层里,则这个水分子就认为属于这一层的水。对于每一帧,计算属于每一层的水selin与其它物质selbig之间的氢键数,氢键包括了这一层中的水作为氢键受体和供体两种情况,其数目分别为代码中的变量a和b。并且加上这一层水内部之间的氢键数(变量c)的2倍。a+b+2c除以这一层的水数,作为这一帧这一层的每个水的平均氢键数。脚本中循环轨迹中的每一帧,最终得到这一层平均氢键数。nonum变量记录有多少帧在所设定的范围里没有水,这些帧不计算。#后面那行用于调试目的,要考察每帧结果就去掉开头的#。
首先运行下面的脚本,来加载实现这个功能的子程序
proc numhbavg {sel fps1 fps2} {
set selin [atomselect top $sel]
set selbig [atomselect top "same resid as exwithin 3.5 of $sel"]
set k 0.0
set nonum 0
for {set i $fps1} {$i<=$fps2} {incr i} {
$selin frame $i
$selin update
$selbig frame $i
$selbig update
if {[$selin num]!=0} {
set a [llength [lindex [measure hbonds 3.5 35 $selbig $selin] 0]] #measure hbonds 3.5 35 $selbig $selin这个命令返回什么样的值?怎么又先用了lindex、llength命令?
set b [llength [lindex [measure hbonds 3.5 35 $selin $selbig] 0]] #这句跟上句的区别?
set c [llength [lindex [measure hbonds 3.5 35 $selin] 0]]  #这句为何只有一个$selin?一般都是像上2句那样有2个$selin $selbig或$selbig $selin?
set k [expr $k+($a+$b+2*$c)*3.0/[$selin num]]
#puts "fps:$i $a+$b+[expr 2*$c] num_water:[expr [$selin num]/3.0] avg:[expr $k+($a+$b+2*$c)*3.0/[$selin num]]"
} else {incr nonum}
}
if {[expr $fps2-$fps1+1]==$nonum} {return "no result"}
return [expr $k/[expr $fps2-$fps1+1-$nonum]]
}
然后下面的循环会调用这个子程序来输出每一层的平均氢键数,这里假设要计算z=4.0~5.6埃的数据,间隔为0.1埃,且限定20 for {set i 40} {$i<=55} {incr i} {
set k [expr $i*0.1]
set now [numhbavg "same resid as resname SOL and x<40 and x>20 and y<40 and y>20 and z<[expr $k+0.1] and z>=$k" 100 150]
puts [format "%4.2f %4.2f %5.3f" $k [expr $k+0.1] $now]
}
我这里随便算一个主要由水构成的普通的体系,水形成的氢键数大概在3.1左右,标准放宽到4.0埃,40度,则可形成氢键数约为3.6。在冰中由于结构十分有序,可形成4个氢键,在液态情况下分子的动能必然造成氢键的破坏,所以结果是很合理的。
帧数范围越大、xy平面越大计算越慢,这个脚本计算速度比较慢,不要一下将范围设得太大。
输出结果如下,前两列代表统计的z值范围,第三列是水的平均氢键数
4.00 4.10 3.015
4.10 4.20 3.161
4.20 4.30 3.201
4.30 4.40 3.159
4.40 4.50 3.237
4.50 4.60 3.130
4.60 4.70 3.201
4.70 4.80 3.338
4.80 4.90 3.201
4.90 5.00 3.041
5.00 5.10 3.122
5.10 5.20 3.182
5.20 5.30 3.160
5.30 5.40 3.309
5.40 5.50 3.189
5.50 5.60 3.327

请各位指点一下,我把自己看不懂的写在上面了,不过可以对程序解释的越详细越好,更便于本人的正确理解!!期待各位高手指点!尤其是bay__gulf !
另:氢键几何判据中角度到底指的哪个?vmd中的measure hbonds 的命令中的角度指的是:“the angle formed by the donor, hydrogen, and acceptor must be less than angle from 180 degrees. “   而我看到的文献Phys. Chem. Chem. Phys. , 2004, 6, 829–835 中氢键几何判据:“The bond angle a between the O–O direction and the molecular O–H direction of the donor, where H is the hydrogen which forms the bond, is lower than a threshold angle aC ”这两个好像不一致啊?

[ Last edited by jianchaoyv on 2010-6-29 at 10:54 ]
回复此楼

» 猜你喜欢

» 本主题相关商家推荐: (我也要在这里推广)

» 本主题相关价值贴推荐,对您同样有帮助:

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

coolrainbow

木虫 (著名写手)

未来国家冻凉


小木虫(金币+0.5):给个红包,谢谢回帖交流
这是sob写的那个脚本?
技术博客:http://hi.baidu.com/coolrainbow/blog
2楼2010-06-29 11:03:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bay__gulf

金虫 (著名写手)

刘苏州

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
lei0736(金币+2):谢谢 2010-06-29 11:31:54
氢键的角度有两种定义方式, 如图所示
3楼2010-06-29 11:20:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

jianchaoyv

金虫 (小有名气)

程序来源于http://hi.baidu.com/sobereva/blo ... 595ef7fc037fbf.html
麻烦最上面程序中还有问题请教!请给解释一下
另外,bay__gulf 那个vmd图画的与vmd的ug中描述好像不符吧??

[ Last edited by jianchaoyv on 2010-6-29 at 14:43 ]
4楼2010-06-29 14:15:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bay__gulf

金虫 (著名写手)

刘苏州

★ ★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
ghcacj(金币+4):谢谢 2010-06-29 15:07:14
hbonds cutoff angle selection1 [selection2]:  Find all hydrogen bonds in the given selection(s), using simple geometric criteria. Donor and acceptor must be within the cutoff distance, and the angle formed by the donor, hydrogen, and acceptor must be less than angle from 180 degrees. Only non-hydrogen atoms are considered in either selection. If both selection1 and selection2 are given, the selection1  is considered the donor and selection2 is considered the acceptor. If only one selection is given, all non-hydrogen atoms in the selection are considered as both donors and acceptors. The two selections must be from the same molecule. The function returns three lists; each element in each list corresponds to one hydrogen bond. The first list contains the indices of the donors, the second contains the indices of the acceptors, and the third contains the index of the hydrogen atom in the hydrogen bond.

Known Issue: The output of hbonds cannot be considered 100% accurate if the donor and acceptor selection share a common set of atoms.
=============

$selbig $selin这个命令返回什么样的值?怎么又先用了lindex、llength命令?
请在上面找答案

#这句跟上句的区别?
逐字比对

这句为何只有一个$selin?一般都是像上2句那样有2个$selin $selbig或$selbig $selin?
请在上面找答案

氢键几何判据中角度到底指的哪个?
请在上面找答案

vmd 的ug 较长, 全部打印不现实
但8,10,11三章一定要打印下来仔仔细细看
5楼2010-06-29 15:05:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 jianchaoyv 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 重要消息,中午系统在维护 +11 yuleib84 2026-08-18 12/600 2026-08-20 11:09 by xskun
[基金申请] 哪位老哥知道今年的国自然具体哪一天放榜? +16 Ldrop2023 2026-08-13 20/1000 2026-08-20 11:07 by xskun
[基金申请] 言之凿凿,8月21号(明天)放榜 +12 医学老男孩 2026-08-20 14/700 2026-08-20 10:53 by ran2233
[基金申请] 时间戳变了,能看出什么问题? +13 基诺咪客 2026-08-17 17/850 2026-08-20 10:43 by wangyue2015
[基金申请] 只有每年这种时候来逛逛小木虫 +21 yaoyewhu2008 2026-08-20 21/1050 2026-08-20 10:37 by Vivilian
[基金申请] 欢迎发来filecode的Mz6后的代码验证其规律 +55 医学老男孩 2026-08-13 125/6250 2026-08-20 09:02 by 医学老男孩
[基金申请] 今天基金会出结果吗?20260819 +14 kkkl_v 2026-08-19 15/750 2026-08-20 08:21 by sunzitan
[教师之家] 为什么余额宝的年化利率越来越低?主要原因有哪些? +5 瞬息宇宙 2026-08-15 5/250 2026-08-19 20:23 by super2002521
[基金申请] 今天放榜吗? +14 布布和一二 2026-08-19 15/750 2026-08-19 18:07 by gltch
[基金申请] filecode=后面第一个是大写字母 +10 wangze12014 2026-08-14 12/600 2026-08-19 16:56 by 苦难博士
[基金申请] 2027广东省杰青 +4 奶牛小黑 2026-08-15 10/500 2026-08-19 11:02 by wanfengnew
[基金申请] 朋友圈看到的 +6 wangzilk 2026-08-18 8/400 2026-08-19 10:55 by Haru815
[基金申请] 快农历七夕节了,轻松一下,男人悄悄话,女施主请不要进来。 +6 Tide man 2026-08-14 7/350 2026-08-19 09:56 by ZJTJZ
[论文投稿] 投稿咨询 +4 wwm09 2026-08-17 6/300 2026-08-18 15:36 by wwm09
[基金申请] 时间戳又变了8-15 +14 archvillain 2026-08-15 26/1300 2026-08-18 13:37 by phantomgost
[基金申请] 今天维护系统维护 祝所有人 高中 +8 gjjjzhong 2026-08-18 9/450 2026-08-18 13:01 by 家与远方
[基金申请] 93BebMhtakh前后11位开头都是大写 +4 且听虎啸 2026-08-17 5/250 2026-08-18 00:49 by 蔡棒棒菂
[基金申请] 感觉是下周放榜了 +6 angus9576 2026-08-17 11/550 2026-08-17 23:57 by angus9576
[精细化工] 招聘 金属平磨液,抛光液研发工程师 +3 小天0311 2026-08-14 3/150 2026-08-16 07:31 by H9PLUS
[基金申请] 各位道友,我要去昆明玩几天,回来见。 +7 Tide man 2026-08-14 8/400 2026-08-15 01:11 by arzu_hma
信息提示
请填处理意见