VMD中小技巧

1.1、 如果设置了初始化设置,可以输入一下两个命令,就可以显示周期性原子

pbc set {a b c}   #如果是xyz结构要先输入晶格参数
pbc get   #查看参数是否与自己的结构一致然后再执行下面命令
sp  ##注意xyz格式执行此命令是会查询一会结构,等待就行。
bt

1.2、CP2K输出的原子轨迹文件中原子跑到格子外,如果你在计算中设定了晶格具有周期性,在命令界面输入如下命令

pbc wrap -all

参考

2、VMD中显示轨迹时键连接乱动

目前是改变显示方式用DynamicBonds

参考

3、VMD初始化设置,在安装目录下的vmd.rc下

############################################################################
#cr                                                                       
#cr            (C) Copyright 1995-2007 The Board of Trustees of the            
#cr                        University of Illinois                         
#cr                         All Rights Reserved                           
#cr                                                                       
############################################################################

############################################################################
# RCS INFORMATION:
#
#       $RCSfile: .vmdrc,v $
#       $Author: johns $        $Locker:  $                $State: Exp $
#       $Revision: 1.9 $      $Date: 2007/01/12 20:12:44 $
#
############################################################################
# DESCRIPTION:
#
# VMD startup script.  The commands here are executed as soon as VMD starts up
############################################################################

# turn on lights 0 and 1
light 0 on
light 1 on
light 2 off
light 3 off

# position the stage and axes
axes location lowerleft
stage location off

# position and turn on menus
menu main     move 5   225
menu display  move 395 30
menu graphics move 395 500
menu color    move 125 225
menu files    move 125 325
menu labels   move 125 525
menu render   move 125 525

menu main      on
#menu display  on
#menu graphics on
#menu color    on
#menu labels   on
#menu render   on
#menu files    on

# start the scene a-rockin'
# rock y by 1

# User's default values for newly loaded molecules/reps, etc
#  mol default color {colorID 5}
#  mol default style {NewCartoon 0.300000 6.000000 4.100000 0}
#  mol default selection {name CA}
#  mol default material {Transparent}

####Custom settings
#pbc wrap -all
mol default style {CPK}
display depthcue off
color Display Background white
#axes location Off
display rendermode GLSL
display distance -8.0

proc bw {} {color Display Background white}
proc bb {} {color Display Background black}

user add key Right {animate next}
user add key Left {animate prev}
user add key Up {animate goto [expr $vmd_frame([molinfo top])+10]}
user add key Down {animate goto [expr $vmd_frame([molinfo top])-10]}
user add key b {mol bondsrecalc all; topo retypebonds}

proc sp {} {
pbc box
pbc wrap -all 
}

proc bt {} {
global vmd_frame
trace variable vmd_frame([molinfo top]) w updatebond
}
proc updatebond {args} {
mol bondsrecalc all
topo retypebonds
}
proc bn {} {
global vmd_frame
trace vdelete vmd_frame([molinfo top]) w updatebond
}

proc fog {} {
display depthcue on
display cuemode Linear
display cuestart 1.75
display cueend 2.5
}

发表评论