define pol oxygen or nitrogen
define npol sulfur or carbon or phosphorus
define drib (*.c?*, *.o?*) and dna
define ph (*.p, *.o?p) and dna
define maj ((*.c4 and pyrimidine),*.c5, *.c6, *.c7, *.c8, *.n4, *.n7, *.n6, *.o6, *.o4) and dna
define min (*.c2, (*.c4 and purine), *.n1, *.n2, *.n3, *.n9, *.o2) and dna
restrict none 
select dna 
wireframe
zoom 350
center dna
background white
refresh
select pol
color cyan
spacefill 100
echo polar atoms
refresh
pause
restrict none 
select dna 
wireframe
refresh
select npol
color red
spacefill 100
echo nonpolar atoms
refresh
pause
restrict none 
select dna 
wireframe
refresh
select drib
color pink
spacefill 100
echo desoxiribose atoms
refresh
pause
restrict none 
select dna 
wireframe
refresh
select ph
color blue
spacefill 100
echo phosphorus atoms
refresh
pause
restrict none 
select dna 
wireframe
refresh
select maj
color yellow
spacefill 100
echo major groowe atoms
refresh
pause
restrict none 
select dna 
wireframe
refresh
select min
color green
spacefill 100
echo minor groowe atoms
refresh
pause
define aa drib and pol
define a within(3.5, aa) and pol and protein
echo drib polar contacts
define bb drib and npol
define b within(4.5, bb) and npol and protein
echo drib nonpolar contacts
define paa ph and pol
define pa within(3.5, paa) and pol and protein
echo phosph polar contacts
define pbb ph and npol
define pb within(4.5, pbb) and npol and protein
echo phosph nonpolar contacts
define jaa maj and pol
define ja within(3.5, jaa) and pol and protein
echo maj groove polar contacts
define jbb maj and npol
define jb within(4.5, jbb) and npol and protein
echo maj groove nonpolar contacts
define naa min and pol
define na within(3.5, naa) and pol and protein
echo min groove polar contacts
define nbb drib and npol
define nb within(4.5, nbb) and npol and protein
echo min groove nonpolar contacts






