define mydna *:E,*:F
define myprot *:D
define protpol (oxygen,nitrogen) and myprot
define protnonpol myprot and not protpol
define ribosepol *.O?* and mydna
define ribosenonpol *.C?* and mydna
define phpol *.O?P and mydna
define phnonpol *.P and mydna
define basebigpol (*.N2,*.N3,*.O3) and mydna
define basebignonpol ((purine and *.C2,*.C4),(pyrimidine and *.C2)) and mydna
define basesmallpol (*.N4,*.N6,*.O4,*.O6,*.N7) and mydna
define basesmallnonpol ((purine and *.C5,*.C6,*.C8),(pyrimidine and *.C4,*.C5,*.C6,*.C7)) and mydna

restrict none
select mydna,myprot
wireframe
echo DNA: chains E, F; protein: chain D
pause
select protpol and within (3.5,ribosepol)
cpk 150
echo Polar atoms of protein which are in contact with ribose
pause
cpk off
select protnonpol and within (4.5,ribosenonpol)
cpk 150
echo Nonpolar atoms of protein which are in contact with ribose
pause
cpk off
select protpol and within (3.5,phpol)
cpk 150
echo Polar atoms of protein which are in contact with phosphate
pause
cpk off
select protnonpol and within (4.5,phnonpol)
cpk 150
echo Nonpolar atoms of protein which are in contact with phosphate
pause
cpk off
select protpol and within (3.5,basebigpol)
cpk 150
echo Polar atoms of protein which are in contact with polar atoms of bases on the big groove of DNA
pause
cpk off
select protnonpol and within (4.5,basebignonpol)
cpk 150
echo Nonpolar atoms of protein which are in contact with nonpolar atoms of bases on the big groove of DNA
pause
cpk off
select protpol and within (3.5,basesmallpol)
cpk 150
echo Polar atoms of protein which are in contact with polar atoms of bases on the small groove of DNA
pause
cpk off
select protnonpol and within (4.5,basesmallnonpol)
cpk 150
echo Nonpolar atoms of protein which are in contact with nonpolar atoms of bases on the small groove of DNA
pause
cpk off
echo Okay, that's all :)