VMD上で原子の色とスケールを調整する
lammpsで出力される.dump ファイルをVMDに食わせると、VMDはlammpsで指定した原子種別番号をそのままtype,Name変数に格納する。この状態では、VMDは原子の種類を正しく認識してないので、おかしな色でモデルを描画するということになる。
なので、VMD Tk consoleから操作して、描画される原子を所望の色とVDW半径に直すこととする。
まず、以下の内容のchangetype.tclファイルを作成する
例中の原子と番号の対応は、1:H,2:C,3:O,4:N
set t1 [atomselect top {type 1}] #type xの原子を選択
set t2 [atomselect top {type 2}]
set t3 [atomselect top {type 3}]
set t4 [atomselect top {type 4}]
$t1 set radius 0.64 #選択した原子のVDW半径を調整
$t2 set radius 1 #炭素を1としてVDW半径のスケールを設定
$t3 set radius 0.89 #
$t4 set radius 0.91 #catch {color Name 1 white} error #色変更
catch {color Name 2 black} error #例外処理噛ませないとname1がないときエラーで止まる
catch {color Name 3 red} error
catch {color Name 4 blue} error
こいつをVMD Tk console上で食わせる
source ./changetype.tcl
試しに、RDX(トリメチレントリニトロアミン - Wikipedia)を表示してみましょう
見てくれが変わりました。良かったですね。