| 1 | # Script to show the intersection of two maps as surfaces and the parts
|
|---|
| 2 | # outside the intersection in mesh with each map colored separately.
|
|---|
| 3 |
|
|---|
| 4 | from chimera import runCommand as r
|
|---|
| 5 | r('open emdbID:1283 emdbID:1284')
|
|---|
| 6 | r('volume #0,1 level 0.35 color lightyellow')
|
|---|
| 7 |
|
|---|
| 8 | # Show surfaces for the intersection of the two maps.
|
|---|
| 9 | # This has to be done in Python. No Chimera command currently available.
|
|---|
| 10 | from Surface import clip
|
|---|
| 11 | import VolumeViewer as VV
|
|---|
| 12 | v1, v2 = VV.volume_list()
|
|---|
| 13 | s1, i1 = clip.volume_surface(v1)
|
|---|
| 14 | s2, i2 = clip.volume_surface(v2)
|
|---|
| 15 | clip.clip_surfaces(s1, i1, s2, i2)
|
|---|
| 16 |
|
|---|
| 17 | # Open two more copies of the maps to show as mesh
|
|---|
| 18 | r('open emdbID:1283 emdbID:1284')
|
|---|
| 19 |
|
|---|
| 20 | # Set the contour level slightly higher so it is hidden by interesection.
|
|---|
| 21 | r('volume #2,3 style mesh level 0.352')
|
|---|
| 22 |
|
|---|
| 23 | # Color mesh with transparency.
|
|---|
| 24 | r('volume #2 color 0,1,0,0.5')
|
|---|
| 25 | r('volume #3 color 1,0,0,0.5')
|
|---|
| 26 |
|
|---|
| 27 | # Set background color
|
|---|
| 28 | r('set bg_color dimgray')
|
|---|