Examples |
Magnet Documentation SEA Reference Selections Expressions Actions Examples |
{all()},{all()}
{dist(l1,r1) < 3.2}
{printf("The distance is %.3f\n",dist(l1,r1))};
prints out all ligand-receptor distances which are less than 3.2 angstroms.
{smarts("*")},{smarts("*")}
{dist(l1,r1)< 3.2}
{printf("The distance is %.3f\n",dist(l1,r1))};
Same as the first rule but probably less efficient since the smarts patterns apply to all atoms in each molecule.
{smarts("*")},{near(3.2) smarts("*")}
{dist(l1,r1)< 3.2}
{printf("The distance is %.3f\n",dist(l1,r1))};
A more efficient version of the previous rule.
{smarts("*")},{near(3.2)}
{dist(l1,r1)< 3.2}
{printf("The distance is %.3f\n",dist(l1,r1))};
Perhaps even more efficient since no smarts match need be done on the receptor.
{all()},{near(3.2)}
{dist(l1,r1)< 3.2}
{printf("The distance is %.3f\n",dist(l1,r1))};
Probably the most efficient version.
{smarts("[!$([#7,#8])]")},{smarts("[!$([#7,#8])]")}
{dist(l1,r1)<.8*vdw(l1,r1)}
{printf("Short contact: %.2f between %s and %s\n" ,
dist(l1,r1),getatinfo(l1),getatinfo(r1))};
This rule [1] prints out the short contacts between atoms not likely to be involved in hydrogen bonds. Of course, more sophisticated smarts could be used to define potentially hydrogen bonding atoms.
{all()},{resname("SER")smarts("*~*")}
{dist(l1,r1)<4.0}
{accept(l1,r1,"H",dist(l1,r1)); printf("%s Distance: %.2f\n",
getatinfo(r1),dist(l1,r1))};
{all()},{resname("SER")smarts("*~*")}
{notdef(l1,r1,"*")&&dist(l1,r1)<4.0}
{accept(l1,r1,"H2",dist(l1,r1)); printf("%s Distance: %.2f\n",
getatinfo(r1),dist(l1,r1))};
Two rules which illustrate the use of notdef . The first rule will print out a number of duplicate lines since the smarts pattern matches in several different ways with the same atom matching the first smarts atom. However, the second rule will print out a non-redundant version of the same list.
define Polar "[$([!#6]),$([#6]~[!#6])]";
{},{} {1.0}
{printf("Begin Ligand %s %s\n",getid(),getmolprop(l,"dockscore"))};
{smarts("[$Polar]")},{} {1.0}
{printf("asa 1 %f %s\n",asa(l1),getatinfo(l1));set(Vpl,asa(l1)+Vpl)};
{smarts("[!$Polar]")},{} {1.0}
{printf("asa 2 %f %s\n",asa(l1),getatinfo(l1));
set(Vnp,asa(l1)+Vnp)};
{},{} {1.0}
{printf("End Ligand Polar area: %f, NonPolar area: %f\n" Vpl,Vnp)};
An example of using variables to accumulate total areas for each ligand (or conformation). Also illustrates getting a molecular property for the ligand (the "dockscore") and printing it out. In this case it is used as a string but the float() function could be used to change the value to a floating point number which could be used in expressions (for example float(getmolprop(l,"dockscore")) < -40.0 ). Finally an example of a set of rules which prints out summary information for molecular interactions (nonbonded and hydrogen bonded) between ligand and receptor. This rule set is rather permissive and a rule set which assigned interactions might be more restrictive in the geometry accepted:
# Simple rule set for outputting molecular interaction geometry
# Hbond definitions derived from original smarts from J Bradshaw
define HDon "[$([!#6;+0])]";
define Hacc "[$([!#6;+0]);!$([F,Cl,Br,I]);!$([o,s,nX3]);!$([Nv5,Pv6,Sv4,Sv6]);!$(N[C,S]=O)]";
#
{smarts("[$HDon]~*")},{smarts("[$HAcc]~*")}
{notdef(l1,r1,"H")&&dist(l1,r1)>2.4 &&
dist(l1,r1)<=3.3&&angle(l2,l1,r1)>80 &&
angle(l2,l1,r1)<180&&angle(l1,r1,r2)>80 &&
angle(l1,r1,r2)<180}
{accept(l1,r1,"H",dist(l1,r1));
printf("%s %s\t%.2f\tangle1:\t%.2f \tangle2:\t%.2f\n",
getatinfo(l1), getatinfo(r1),dist(l1,r1), angle(l2,l1,r1), angle(l1,r1,r2))};
{smarts("[$HAcc]~*")},{smarts("[$HDon]~*")}
{notdef(l1,r1,"H")&&dist(l1,r1)>2.4 &&dist(l1,r1)<=3.3
&&angle(l2,l1,r1)>80 &&angle(l2,l1,r1)<180
&&angle(l1,r1,r2)>80 &&angle(l1,r1,r2)<180}
{accept(l1,r1,"H",dist(l1,r1));
printf("%s %s\t%.2f\tangle1:\t%.2f \tangle2:\t%.2f\n",
getatinfo(l1), getatinfo(r1),dist(l1,r1), angle(l2,l1,r1), angle(l1,r1,r2))};
#
{smarts("[$HDon]~*")},{smarts("[$HAcc;D0]")}
{notdef(l1,r1,"H")&&dist(l1,r1)>2.4 &&dist(l1,r1)<=3.3
&&angle(l2,l1,r1)>80 &&angle(l2,l1,r1)<180}
{accept(l1,r1,"H",dist(l1,r1)); printf("%s %s\t%.2f\tangle1:\t%.2f\n",
getatinfo(l1), getatinfo(r1),dist(l1,r1), angle(l2,l1,r1))};
{smarts("[$HAcc]~*")},{smarts("[$HDon;D0]")}
{notdef(l1,r1,"H")&&dist(l1,r1)>2.4 &&dist(l1,r1)<=3.3
&&angle(l2,l1,r1)>80 &&angle(l2,l1,r1)<180}
{accept(l1,r1,"H",dist(l1,r1)); printf("%s %s\t%.2f\tangle1:\t%.2f\n",
getatinfo(l1), getatinfo(r1),dist(l1,r1), angle(l2,l1,r1))};
{smarts("[#6]~[!$HDon;!$HAcc]")},{near(4.2) smarts("[#6;$SEL]~[!$HDon;!$HAcc]")}
{notdef(l1,r1,"*")&&dist(l1,r1)<1.1*vdw(l1,r1)}
{accept(l1,r1,"N",dist(l1,r1)); printf("%s %s\tNbond:\t%.2f\n",
getatinfo(l1),getatinfo(r1), dist(l1,r1))};
Which gives the following output when run on the folate ligand in 7DFR.pdb:
| |||