From: YOLANDA SMALL (yas102_at_psu.edu)
Date: Tue May 10 2005 - 12:44:12 CDT

Hello John,

Yes, this is a subset of a larger script. The problem is that the "within"
command isn't being updated for every frame as I would expect. For example, in
VMD under the Graphical Representation > selected atoms box, if I put the
following command

resid 30 or solvent within 4 of resid 30

When I run the animation through 400 frames, I expect to see some solvent
molecules appear and disappear based on whether they fall within or outside of
the 4 Ang range. This doesn't happen. Instead, I keep observing the same
number of solvent molecules in all frames but the distances will change and
some distances are much longer than the 4 Ang that I specified.

I thought that the following lines update the selection for each frame, but they
do not.
$sel1 frame $frame
$sel1 update

What is the command to update the selection for each frame?

Thanks,
Yolanda

On Tue, 10 May 2005 10:36:24 +0000, John Stone wrote:

>
> 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
>
>