# Copyright (c) 2002-08 Peter Guntert. All rights reserved. ## 7MACROS: watsoncrick - CYANA macro ## ## Parameters: strand1= (required) ## strand2= (required) ## planar ## ## Creates restraints to enforce standard Watson-Crick-type pase pairing ## between two antiparallel DNA or RNA strands. The two strands must have the ## same length and continuous numbering. Optionally, additional planarity ## restraints can be added that restrain the interstrand C1'-C1' distances to ## 10.35-10.65 A for A-T and 10.6-10.9 A for C-G base pairs. var info echo i i1 i2 j k l n syntax $macro:strand1=@ii strand2=@ii planar info:=none; echo:=off if (strand1(2)-strand1(1).ne.strand2(2)-strand2(1)) \ error "The two strands have not the same length." i1=irnum(strand1(1)); i2=irnum(strand2(2)) n=0 do i strand1(1) strand1(2) j=irnum(i); k=i2-(j-i1) if (rnam(j).eq.'CYT' .or. rnam(j).eq.'RCYT' .or. \ rnam(j).eq.'THY' .or. rnam(j).eq.'URA') then l=j; j=k; k=l end if if ((rnam(j).eq.'GUA' .or. rnam(j).eq.'RGUA') .and. \ (rnam(k).eq.'CYT' .or. rnam(k).eq.'RCYT')) then n=n+1 hbond H21 $rnum(j) O2 $rnum(k) hbond H1 $rnum(j) N3 $rnum(k) hbond O6 $rnum(j) H41 $rnum(k) if (planar) then distance make "C1\' $rnum(j)" "C1\' $rnum(k)" lol=10.6 upl=10.9 end if else if ((rnam(j).eq.'ADE' .or. rnam(j).eq.'RADE') .and. \ (rnam(k).eq.'THY' .or. rnam(k).eq.'URA')) then n=n+1 hbond N1 $rnum(j) H3 $rnum(k) hbond H61 $rnum(j) O4 $rnum(k) if (planar) then distance make "C1\' $rnum(j)" "C1\' $rnum(k)" lol=10.35 upl=10.65 end if end if end do unset info if (planar) then print " H-bond and planarity restraints for $n Watson-Crick base pairs added." else print " Hydrogen bond restraints for $n Watson-Crick base pairs added." end if