#Script-file for determining the quantity of DNA-protein contacts in DNA-protein complex
restrict d?
define mjg dc.n4,da.n6,dt.o4,dg.o6,dg.n7,da.n7,dt.c5,dc.c5,dg.c8,da.c8,dt.c6,dc.c6,dg.c5,da.c5
echo #DNA base atoms from major groove
define mig dc.o2,dt.o2,dg.n3,dg.n2,da.n3,da.c2
echo #DNA base atoms from minor groove
define tocompl dt.o4,dt.n3,dc.n4,dc.n3,dc.o2,dg.o6,dg.n1,dg.n2,da.n6,da.n1
define basen dc.c2,dc.c4,dc.n1,dt.c4,dt.c2,dt.c5,dt.n1,dg.c2,dg.c4,dg.n9,dg.c6,da.c4,da.n9,da.c6
define base mjg,mig,tocompl,basen
echo #DNA base atoms, amount to "dna and not backbone"
define pl_deri d?.o?'
echo #polar atoms from deoxyribose
define pl_ph d?.op?
echo #polar atoms from phosphates
define pl_mjg mjg and (oxygen,nitrogen)
echo #polar base atoms from major groove
define pl_mig mig and (oxygen,nitrogen)
echo #polar base atoms from minor groove
define np_deri d?.c?'
echo #non-polar atoms from deoxyribose
define np_mjg mjg and carbon
echo #non-polar atoms from major groove
define np_mig mig and carbon
echo #non-polar atoms from minor groove
echo #now all sets we need are nominated and it is time to begin the count
select within (3.5,pl_deri) and protein and (*.n???, *.o???)
spacefill 70
color red
label %n %r %a %c
echo #13 contacts with polar atoms from deoxyribose
pause
color cpk
label off
spacefill off
select within (3.5,pl_ph) and protein and (*.n???, *.o???)
spacefill 70
color red
label %n %r %a %c
echo #39 contacts with polar atoms from phosphates
pause
color cpk
label off
spacefill off
select within (3.5,pl_mjg) and protein and (*.n???, *.o???)
echo #no contacts with polar atoms from major groove
pause
select within (3.5,pl_mig) and protein and (*.n???, *.o???)
spacefill 70
color red
label %n %r %a %c
echo #3 contacts with polar atoms from minor groove
pause
color cpk
label off
spacefill off
select within (4.5,np_deri) and protein and not (*.n???, *.o???)
spacefill 70
color blue
label %n %r %a %c
echo #69 contacts with non-polar atoms from deoxyribose
pause
color cpk
label off
spacefill off
select within (4.5,np_mjg) and protein and not (*.n???, *.o???)
echo #no contacts with non-polar atoms from major groove
pause
select within (4.5,np_mig) and protein and not (*.n???, *.o???)
spacefill 70
color blue
label %n %r %a %c
echo #1 contacts with non-polar atoms from minor groove
pause
color cpk
label off
spacefill off
echo #the quantity of polar and non-polar DNA-protein contacts is determined, voila (: |