#This Rasmol script is for display of GCN4, a eukaryotic transcription 
#factor containing a basic region leucine zipper (bZIP) DNA-binding motif.
#From the structure determined by Ellenberger et al., 1992, Cell 71, pp.
# 1223-1237.  Rasmol commands by Hannah Chen.
#If molecule isn't loaded...
#zap
#load GCN4-1.pdb
#Script starts here:
define g_major (G and (*.N7 or *.O6 or *.C5 or *.C6 or *.C8 or *.H8))
define a_major (A and (*.N6 or *.N7 or *.C5 or *.C6 or *.2H6 or *.C8 or *.H8)) 
define t_major (T and (*.C5 or *.O4 or *.C4 or *.C5M or *.1H5M or *.2H5M or *.3H5M))
define c_major (C and (*.C5 or *.N4 or *.C4 or *.1H4 or *.2H4 or *.H5))
define g_minor (G and (*.N3 or *.C4 or *.C2 or *.N2 or *.1H2 or *.2H2))
define a_minor (A and (*.N3 or *.C4 or *.C2 or *.H2))
define c_minor (C and (*.C2 or *.O2))
define t_minor (T and (*.C2 or *.O2))
define major_groove (g_major or a_major or c_major or t_major)
define minor_groove (g_minor or a_minor or c_minor or t_minor)

#---------------------------------------------------------------------------
#GCN4's basic region of a helix is anchored in the major groove (colored red),
#you can rotate to see more clearly.
select protein
Ribbon on
color yellow
wireframe off
reset
rotate z -113
rotate y 2
rotate x -177
select DNA
wireframe 125
select major_groove
color red
select minor_groove
color violet
select DNA and (not major_groove) and (not minor_groove)
color white

#--------------------------------------------------------------------------
#View leucine zipper
select leu
color magenta
spacefill 300

#--------------------------------------------------------------------------
#Positive arginine residues interact with negative DNA backbone
select arg
color blue
spacefill 300

#--------------------------------------------------------------------------
#asn235 form H-bonds with DNA
select asn235
color cyan
spacefill 300

#--------------------------------------------------------------------------
restrict within(10.0, asn235)
select arg or leu
spacefill off
reset
rotate z 40
rotate y -24
rotate x -60
translate x -14
translate y -21
zoom 200
select asn235
spacefill 300
color cyan
select c12, c34, t29, t7
color cyan
select atomno=909, atomno=243, atomno=1390, atomno=694
spacefill 300
color green
select atomno=910, atomno=589, atomno=1391, atomno=141
spacefill 300
color purple
select protein and within(10.0, asn235) and not asn235 
color yellow

#--------------------------------------------------------------------------
#View H-bonds between 
#	Asn235c: OD1(909)  --  C12(chaina): N4(243)
#	         ND2(910)  --  T29(chainb): O4(589)
#(there is another set:
#	Asn235d: OD1(1390) --  C34(chainb): N4(694)
#	         ND2(1391) --  T7(chania):  O4(141))
restrict asn235c, c12, t29
reset
rotate z 62
rotate y -10
rotate x -53
translate x 4
translate y -17
zoom 300
spacefill 300
color cpk
select atomno=909, atomno=243
color green
select atomno=910, atomno=589
color blue

set fontsize 16
select c12.O2
label C12
select t29.O3*
label T29
select asn235c.N
label Asn235

#select dna
#ribbon 300
#color yellow
#select protein and not asn235c
#ribbon 300
#color lightblue

#--------------------------------------------------------------------------
#View H-bonds between 
#	Arg243d		G32(chain b)
#	NH1(145)  --  	 O6(652)
#	NH2(1456) -- 	 N7(649)
#Due to asymmetry, Arg243c can not form H-bonds with corresponding G.
restrict arg243d, g32 
spacefill 300
reset
rotate z -174
rotate y -4
rotate x 156
translate x 36
translate y -8
zoom 300

color cpk
select atomno=1455, atomno=652
color green
select atomno=1456, atomno=649
color blue

set fontsize 16
select G32.O5*
label G32
select arg243d.NE
label Arg243

#--------------------------------------------------------------------------