|
|
本帖最后由 cgy 于 2024-7-7 11:48 编辑
各位老师好,本人新手,在使用VMD进行可视化分析时,想要求x>0 and x<50 and y>0 and y<50 and z>130 and z<150区域的逐帧原子数,学习一段时间VMD脚本语言后,自行编写了一段脚本,尝试进行输出我所需要的区域的原子数,结果最后输出为全部总数原子,请问各位老师我写的脚本存在什么问题,谢谢老师。在无选定的区域上的原子数是由0逐渐到四千多个分子,而不是体系总分子数10290。
mol new {md.trr} type {trr} waitfor all
for {set i 0} {$i <= 201} {incr i} {
set sel [atomselect top "x > 0 and x < 50 and y > 0 and y < 50 and z > 130 and z < 150"]
animate goto $i
set num_atoms [molinfo top get numatoms]
puts "Frame $i: $num_atoms atoms"
}
md.gro和md.trr文件压缩后还32MB上传不了,就附上VMD输入脚本后的计数错误的截图。是在VMD打开md.trr文件后输入的脚本。谢谢各位老师了。
|
|