restrict none
select all
define pol_prot (*.O?? or *.N??) and (*A or *B)
define npol_prot (*.S?? or *.P?? or *.C??) and (*A or *B)
define rib_pol *.O4*  and backbone
define rib_npol *.C?*   and backbone
define phos_pol *.O?P and dna
define phos_npol *.P and dna 
define major_pol (*.N4 or *.N6 or *.N7 or *.O4 or *.O6) and dna
define major_npol (*.C6 or *.C5 or *.C4 or *.C8) and dna
define minor_pol (*.N2 or *.N3 or *.O2 ) and dna
define minor_npol *.C2  and dna
define set1 within (3.5, pol_prot) and rib_pol
define set2 within (4.5, npol_prot) and rib_npol
define set3 within (3.5, pol_prot) and phos_pol
define set4 within (4.5, npol_prot) and phos_npol
define set5 within (3.5, pol_prot) and major_pol
define set6 within (4.5, npol_prot) and major_npol
define set7 within (3.5, pol_prot) and minor_pol
define set8 within (4.5, npol_prot) and minor_npol