| 查看: 1949 | 回复: 15 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
[交流]
【求助】向bay__gulf求助!! 已有4人参与
|
|||
|
目前在做碳纳米管中水的相变,请教一下怎样写.tcl脚本来计算radial density of oxygen 和 orientation distributions of water molecules within CNTs? 虽然这个问题对你可能比较简单,但对我来说却很棘手,望赐教! 同时恭喜bay__gulf发JPCA! 也欢迎其他高手指教! |
» 猜你喜欢
全日制(定向)博士
已经有5人回复
假如你的研究生提出不合理要求
已经有10人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
实验室接单子
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
» 本主题相关商家推荐: (我也要在这里推广)
» 本主题相关价值贴推荐,对您同样有帮助:
【求助】高校图书馆采购集团和Elsevier公司闹崩了,以后CPL等文献怎么看呢?
已经有21人回复
【求助】有没有用DS软件做细胞膜的模拟的?
已经有7人回复
【求助】周期边界条件设定
已经有10人回复
【求助】有关服务器租用或者借用的事情
已经有15人回复
【求助】泊松过程的误差分析
已经有5人回复
【求助】请问量子化学的基础是“物理化学”么?
已经有18人回复
3楼2010-06-22 19:41:03
bay__gulf
金虫 (著名写手)
刘苏州
- 模拟EPI: 8
- 应助: 9 (幼儿园)
- 贵宾: 4.85
- 金币: 2332.8
- 红花: 1
- 帖子: 1344
- 在线: 271小时
- 虫号: 592012
- 注册: 2008-09-03
- 专业: 理论和计算化学
- 管辖: 分子模拟
★ ★ ★ ★ ★ ★ ★ ★ ★ ★
jianchaoyv(金币+10):谢谢指点 2010-06-22 18:29:11
ghcacj(金币+10):谢谢 2010-06-22 19:55:31
jianchaoyv(金币+10):谢谢指点 2010-06-22 18:29:11
ghcacj(金币+10):谢谢 2010-06-22 19:55:31
|
radial density, 也就是径向分布, 很常用, vmd 也提供了一个工具可以直接计算 就是measure gofr, 参考 http://www.ks.uiuc.edu/Research/vmd/current/ug/node133.html, 以及一个gui 界面, 参考 http://www.ks.uiuc.edu/Research/vmd/plugins/gofrgui/ 至于取向分布, 用户较少只能自己写了, vmd 的强大之处不在于内置了多少工具, 更不是做多漂亮的图形 而是提供了一个原子(集团)为数据结构的编程环境, 可以按照自己的需要实现任意的功能 下面是当时用的代码, 现在看来很幼稚了但拿它入门还是不错的 # count the dipolar-z angle and Legendre 2nd order polynomial in a pore, # make sure the psf/dcd be the top molecular set outf [open theta.dat w] set numFrame [molinfo top get numframes] set lgd 0 for { set fr 1 } { $fr < $numFrame } {incr fr } { set wt [atomselect top "water and name OH2 and z < 7.6 and z > -7.6 " frame $fr] set n [$wt num] set theta 0 foreach resid [$wt get resid] { set wto [atomselect top "resid $resid and name OH2" frame $fr] set wth1 [atomselect top "resid $resid and name H1" frame $fr] set wth2 [atomselect top "resid $resid and name H2" frame $fr] set coordo [measure center $wto] set coordh1 [measure center $wth1] set coordh2 [measure center $wth2] set coordh [vecadd $coordh1 $coordh2] set coordh [vecscale 0.5 $coordh] set vecd [vecsub $coordh $coordo] set thetai [expr acos ([expr [lindex $vecd 2] / [veclength $vecd]])] set thetai [expr $thetai * 180.0 / 3.1416] set theta [expr $theta + $thetai] $wto delete $wth1 delete $wth2 delete } set theta [expr $theta/$n ] set costheta [expr cos ([expr $theta*3.1416/180.0])] set lgd [expr $lgd + [expr $costheta * $costheta]] puts $fr puts $outf [format "%d %f" $fr $theta] $wt delete } set lgd [expr $lgd / $numFrame * 1.5 - 0.5] puts "3*<(cosθ)^2> - 1 = $lgd" close $outf |
2楼2010-06-22 16:44:02
|
请问上面提供的脚本中: set coordh [vecadd $coordh1 $coordh2] set coordh [vecscale 0.5 $coordh] set vecd [vecsub $coordh $coordo] set thetai [expr acos ([expr [lindex $vecd 2] / [veclength $vecd]])] 还有最后set lgd [expr $lgd / $numFrame * 1.5 - 0.5] 这几句看不懂,能不能解释一下?谢谢! [ Last edited by jianchaoyv on 2010-6-23 at 09:56 ] |
4楼2010-06-23 09:50:22
bay__gulf
金虫 (著名写手)
刘苏州
- 模拟EPI: 8
- 应助: 9 (幼儿园)
- 贵宾: 4.85
- 金币: 2332.8
- 红花: 1
- 帖子: 1344
- 在线: 271小时
- 虫号: 592012
- 注册: 2008-09-03
- 专业: 理论和计算化学
- 管辖: 分子模拟
★ ★ ★ ★ ★
ghcacj(金币+5):谢谢 2010-06-24 10:06:00
ghcacj(金币+5):谢谢 2010-06-24 10:06:00
|
set coordh [vecadd $coordh1 $coordh2] ;#两个H的坐标之和 set coordh [vecscale 0.5 $coordh] ;#两个H的平均坐标, 即中点 set vecd [vecsub $coordh $coordo] ;#O原子到H中点的矢量, 即水的偶记(方向) set thetai [expr acos ([expr [lindex $vecd 2] / [veclength $vecd]])] # 水的偶极u跟z轴(0 0 1)的夹角, cos(theta) = u(z)/|u| 还有最后set lgd [expr $lgd / $numFrame * 1.5 - 0.5] 勒让德项 (3 参考 http://www.mdbbs.org/viewthread.php?tid=11530 |
5楼2010-06-24 09:13:13












回复此楼