-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathvisualize.tcl
58 lines (41 loc) · 1.23 KB
/
visualize.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# vmd -e visualize.tcl my_psf my_dcd
#
# Load a trajectory and visualize it in a way that I like
set ligand "CA ZN"
# Delete default representation
mol delrep 0 top
# Align protein from all frames to protein from the first frame
set sel1 [atomselect top "protein and name CA" frame 0]
set sel2 [atomselect top "protein and name CA" frame 0]
set move_sel [atomselect top "all" frame 0]
set num_frames [molinfo top get numframes]
for {set frame_number 0} {$frame_number < $num_frames} {incr frame_number} {
$sel2 frame $frame_number
$move_sel frame $frame_number
set transformation_matrix [measure fit $sel2 $sel1]
$move_sel move $transformation_matrix
}
# Create new representations
mol representation Lines
mol selection "protein"
mol addrep top
mol representation Tube
mol selection "protein"
mol addrep top
mol representation VDW
mol selection "resname ${ligand}"
mol addrep top
#mol selection "resid 17"
#mol addrep top
#mol selection "solvent within 4 protein"
#mol addrep top
#mol selupdate 3 top on
#mol representation HBonds
#mol selection "(resname ${ligand})"
#mol addrep top
#mol selupdate 4 top on
mol smoothrep top 0 5
mol smoothrep top 1 5
#mol smoothrep top 2 5
#mol smoothrep top 3 5
#mol smoothrep top 4 5