# Copyright (c) 2002-08 Peter Guntert. All rights reserved. ## 7MACROS: hbond - CYANA macro ## ## Parameters: atom1= (required) ## residue1= (required) ## atom2= (required) ## residue2= (required) ## ## Creates the standard upper and lower limit distance restraints ## (Williamson et al., 1985) to enforce a hydrogen bond between two atoms, ## one of which must be a hydrogen atom. The distance between the hydrogen ## and the acceptor is restrained to the range 1.8-2.0 A, and the distance ## between the atom covalently bound to the hydrogen and the acceptor is ## restrained to the range 2.7-3.0 A. var info echo i i1 i2 syntax $macro:atom1=* residue1=@i atom2=* residue2=@i info:=none; echo:=off do i 1 2 i$i=iatom('$atom$i $residue$i') if (i$i.le.0) error "Atom $atom$i $residue$i does not exist." end do if (element(i2).eq.1) then i=i1; i1=i2; i2=i end if if (element(i1).ne.1) error "No hydrogen atom in hydrogen bond." i=ibond(i1,1) distance make "$atom(i1)" "$atom(i2)" lol=1.8 upl=2.0 distance make "$atom(i)" "$atom(i2)" lol=2.7 upl=3.0 unset info print " Restraints for hydrogen bond $atomlong(i1) - $atomlong(i2) added."