vmd のスクリプト覚え書き

追記していく予定。

読み込み

mol load psf topology.psf
for {set i 0} {$i < 40} {incr i} {mol addfile [format "production_run_%02d.dcd" $i]}

表示の追加

mol rep NewCartoon
mol selection protein
mol color SegName
mol addrep top

mol rep Licorice
mol selection {resname POPC and not type "H.*" and within 5 of protein}
mol color Type
mol addrep top

いろいろ設定をしてから addrep で追加。現在の rep の数は molinfo top get numreps で取得できる。

ちなみに、{} は Tcl でエスケープの働きをもつ。Tcl/Tk - Wikipedia 参照。

ファイル形式の変換

mol load psf topology.psf
mol addfile md.coor
[atomselect top all] writepdb coord.pdb