Changes display defaults
1
2
3
4
5
6
| # Changes display defaults
display resize 600 600
axes location off
display projection orthographic
color Display Background white
color Name {L} silver
|
Set the unitcell parameters
1
| pbc set {10 10 10} -all
|
This will set the unit cell side length to 10 in all frames.
Get the unitcell parameters.
Control the line and color of pbc box.
1
2
3
| pbc box
pbc box -width 2
pbc box -color black -width 1
|
Background color
1
| color Display {Background} white
|
Get the matrix the the current view
1
2
3
|
set current_view [molinfo top get {center_matrix rotate_matrix scale_matrix}]
|
set the center matrix, rotate matrix, and scale matrix (method1)
1
2
3
4
5
6
|
set center_matrix {{1 0 0 -53.7869} {0 1 0 -55.8598} {0 0 1 -56.52} {0 0 0 1}}
set rotate_matrix {{1 0 0 0} {0 1 0 0} {0 0 1 0} {0 0 0 1}}
set scale_matrix {{0.0123114 0 0 0} {0 0.0123114 0 0} {0 0 0.0123114 0} {0 0 0 1}}
set current_view [list $center_matrix $rotate_matrix $scale_matrix]
|
set the center matrix, rotate matrix, and scale matrix (method2)
1
2
3
|
set current_view [list {{1 0 0 -53.7869} {0 1 0 -55.8598} {0 0 1 -56.52} {0 0 0 1}} {{1 0 0 0} {0 1 0 0} {0 0 1 0} {0 0 0 1}} {{0.0123114 0 0 0} {0 0.0123114 0 0} {0 0 0.0123114 0} {0 0 0 1}}]
|
display the view by the setting
1
| molinfo top set {center_matrix rotate_matrix scale_matrix} $current_view
|
rotate view
Show the pbc box
1
| pbc box -color black -width 5
|
Atoms (residues) select
1
2
3
| same residue as (within 3 of resid 9250)
same residue as (within 3 of resname LIion)
|
select atoms and write to pdb file
1
2
3
| set test [atomselect top {same residue as (within 11 of resid 8410)}]
atomselect0 writepdb a.pdb
|
1
2
3
| render Tachyon tmp.dat
"/Applications/VMD\ 1.9.4a57-x86_64-Rev12.app/Contents/vmd/tachyon_MACOSXX86_64" tmp.dat -format PNG -res 2048 2048 -o /Users/mark/Desktop/Li2S6/DME1.png
|
Ref:
VMD 簡單說明
VMD 筆記