restrict none
background white
define dnapro *i, *j, *m, *n, *o, *k
select dnapro
wireframe 30
pause
restrict none
select dnapro
backbone 30
pause

define polarat dnapro and (nitrogen or oxygen) 
define unpolarat (carbon or sulfur or phosphorus) and dnapro 
define phosphate (*.O?P or *.P) and dnapro
define dxribose (*.O?* or *.C?*) and dnapro

select polarat
cpk 150
echo Polar atoms of oxygen and nitrogen in DNA
pause
cpk off

select unpolarat                           
cpk 150                                
echo Unpolar atoms of carbon, sulfur, phosphorus in DNA
pause                                  
cpk off

select phosphate                           
cpk 150                                
echo Atoms of phosphate
pause                                  
cpk off                                

select dxribose                           
cpk 150                                
echo Atoms of deoxyribose
pause                                  
cpk off                                

pause
define dnk (*O,*K)
define polar_cont within (3.5, (protein and polarat)) and dnk and polarat
define unpolar_cont within (4.5, (protein and unpolarat)) and dnk and unpolarat

select polar_cont and dxribose
cpk 150                                                 
echo Polar contacts between deoxyribose DNA and protein 
pause                                                   
cpk off

select unpolar_cont and dxribose
cpk 150
echo Unpolar contacts between deoxyribose of DNA and protein                                                            
pause
cpk off

select polar_cont and phosphate
cpk 150
echo Polar contacts between phosphate and protein
pause
cpk off

select unpolar_cont and phosphate                  
cpk 150                                          
echo Unpolar contacts between phosphate and protein
pause                                            
cpk off

define big (*.C5M,da.c5,da.c8,da.n6,da.n7,dt.c5,dt.c6,dt.o4,dg.c5,dg.c8,dg.o6,dg.n7,dc.c5,dc.c6,dc.n4) and dnk 
define smallb (da.c2,da.n3,dt.o2,dg.n2,dg.n3,dc.o2) and dnk



select polar_cont and big                                                                
cpk 150                                              
echo Polar contacts between bases(big) and protein    
pause                                                
cpk off                                              
                                                     
select unpolar_cont and big                    
cpk 150                                              
echo Unpolar contacts between bases(big) and protein  
pause                                                
cpk off 

select polar_cont and smallb                                                                   
cpk 150                                              
echo Polar contacts between bases (small) and protein    
pause                                                
cpk off                                              
                                                     
select unpolar_cont and smallb                    
cpk 150                                              
echo Unpolar contacts between bases (small) and protein  
pause                                                
cpk off                                              