vmd

vmd修改载入时的绘图设定

windows下面在启动目录加入vmd.rc文件,linux在~下加入.vmdrc文件,内容大致如下(设置颜色的地方标红)(因为用了代码高亮所以废了,自己找吧):

# 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 1}
#  mol default style {VDW 0.300000}
#  mol default selection {type 2}
#  mol default material {Transparent}
display projection orthographic


proc reset_viz {molid} {
  # operate only on existing molecules
  if {[lsearch [molinfo list] $molid] >= 0} {
    # delete all representations
    set numrep [molinfo $molid get numreps]
    for {set i 0} {$i < $numrep} {incr i} {
      mol delrep $i $molid
    }
    # add new representations
mol color {colorID 3}
    mol representation VDW 0.1 15.0
    mol selection {type 1}
    mol addrep $molid
    mol color {colorID 1}
    mol representation VDW 0.1 15.0
    mol selection {type 2}
    mol material Opaque
    mol addrep $molid
mol color {colorID 6}
    mol representation Points
    mol selection {type 3}
    mol addrep $molid
#mol color {colorID 2}
    #mol representation Points
    #mol selection {type 4}
    #mol addrep $molid
  } 
}

proc reset_viz_proxy {args} {
  foreach {fname molid rw} $args {}
  eval "after idle {reset_viz $molid}"
}

## hook up the function.
trace variable vmd_initialize_structure w reset_viz_proxy
# take care of molecule loaded at start.
after idle { reset_viz 0 }

vmd导出为透明背景的PNG图片

将display里的Dept Cueing勾去掉。

  1. Render the current scene using,选POV-Ray 3.6
  2. Filename,不要出现等号
  3. Render Command: +UA, 保存图片后出现*.pov格式图片
  4. 终端运行povray +W669 +H834 -I*.pov -O*.pov.tga +D +X +A +FT +UA(可以省掉,与3重复)
  5. 终端运行convert *.pov.tag *.png

results matching ""

    No results matching ""