SIMPSON coding examples

Quadrupole tensors in calbindin

by Thomas Vosegaard

Simple graphical illustration of how to place tensors and dipole distances in a molecule.

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
package require simmol
mol delete all
set m [mol new 3ICB.pdb first 0 last 0]
axes location Off
color Display Background white
msetview $m 0.15 {147.68 -148.60 -139.17} {{1 0 0 0.05} {0 1 0 -0.67} {0 0 1 0} {0 0 0 1}}
display projection Orthographic
mol modstyle 0 $m NewCartoon 0.1 10 3 0
mol modselect 0 $m chain A
mol modcolor 0 $m Chain

set ca [atomselect $m "name CA and not protein"]
set capos [$ca get {x y z}]
set ids [$ca get index]
$ca delete
mtensor $m [lindex $capos 0] [mgeteulermatrix {20 45 0}] red gray {0.7 0.5 1.5}
mtensor $m [lindex $capos 1] [mgeteulermatrix {-20 45 0}] red gray {0.7 0.5 1.5}

set i 0
graphics top color yellow
set sel "resid"
foreach indx $ids {
  set o [atomselect $m "name \"O.*\" and within 4 of index $indx"]
	foreach p [$o get {x y z}] {
		mdash $p [lindex $capos $i] 0.1
	}
	foreach r [$o get resid] {
		set sel "$sel $r"
	}
	$o delete
	incr i
}

mol color Name
mol representation CPK 1 0.3 10 10
mol selection chain A and $sel
mol material Transparent
mol addrep $m
render TachyonInternal calbindin.tga convert calbindin.tga calbindin.png
Files:3ICB.pdb
calbindin.tcl
Add comment

Snippets version 1.0.1