From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue May 10 2005 - 10:36:24 CDT

Yolanda,
  Is this a piece of a larger script? I noticed a few inconsistencies
that indicate that either you're leaving out parts of your script or you
have a couple of obvious typos to fix in this one. There's no $sel1 being
set in the script you included below, yet you reference it inside your
loop. I assume you intended for that to be $nearby?

  John

On Mon, May 09, 2005 at 05:23:24PM -0400, YOLANDA SMALL wrote:
> Hello,
>
> I would like to calculate the number of hydrogen bonds within a certain region
> of the protein.
> What is the syntax to select water molecules within 3.1 Ang of a residue?
>
> I tried the following but it didn't work:
>
> set distance 3.1
> set nearby [atomselect top "(resname HOH within $distance of resid 189)"]
> set cutoff 3.0
> set angle 30.0
> set chan [open test_output.log a]
> for {set frame 0} {$frame < $nf} {incr frame 1} {
> $sel1 frame $frame
> $sel1 update
> set sel2 [measure hbonds $cutoff $angle $sel1]
> puts $chan "h-bonds for frame $frame is $sel2"
> }
> close $chan

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078