计算化学公社

标题: 求助:vmd的tcl脚本纠正 [打印本页]

作者
Author:
1367    时间: 2024-7-4 14:54
标题: 求助:vmd的tcl脚本纠正
各位老师同学好,我尝试使用vmd去分析当前体系的总键数,目前根据论坛的资料写了一个tcl脚本,如下,但是测出来的每一帧的体系都是当前帧的总键数,想大家帮忙看看究竟是缺失了什么命令,是输出没有设置循环嘛?感谢各位。
  1. set sel [atomselect top all]   
  2. set total_bonds 0  
  3. for {set i 0} {$i<300} {incr i} {  
  4.     $sel frame $i  
  5.     $sel update   
  6.     set bond_counts [$sel get numbonds]   
  7.     set frame_bonds 0   
  8.     foreach count $bond_counts {  
  9.         incr frame_bonds $count  
  10.     }   
  11.     puts "Frame: $i   numbonds: $frame_bonds"   
  12. }
复制代码
(, 下载次数 Times of downloads: 17)

作者
Author:
fhh2626    时间: 2024-7-4 18:11
VMD里面键是不会随帧数变化的
作者
Author:
lyj714    时间: 2024-7-4 19:57
本帖最后由 lyj714 于 2024-7-4 19:59 编辑

针对每一帧:
  1. animate goto $i
  2. mol bondsrecalc top
  3. mol reanalyze  top
复制代码







欢迎光临 计算化学公社 (http://ccc.keinsci.com/) Powered by Discuz! X3.3