From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jun 05 2007 - 10:12:00 CDT

Philipp,
  The measure commands don't (yet) take PBC into account, so you'll
need to use the PBC tools plugins to unwrap the atom coordinates before
doing this analysis.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Jun 05, 2007 at 04:30:03PM +0200, Philipp Schoen1 wrote:
>
> Dear users
> i do the following in order to check the distance of hydrogen bonded atoms:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> proc hbdist {"sel0" "sel1"} {
> set out [open "dist.dat" w]
> set numframes [molinfo 0 get numframes]
> puts "$numframes frames!"
> for {set frame 1} {$frame <= $numframes} {incr frame} {
> $sel0 frame $frame
> $sel0 update
> $sel1 frame $frame
> $sel1 update
> set hbonds [measure hbonds 4.0 35 $sel0 $sel1]
> foreach donor [lindex ${hbonds} 0] acceptor [lindex ${hbonds} 1] {
> set datom [atomselect 0 "index $donor"]
> set aatom [atomselect 0 "index $acceptor"]
> foreach donlist [lindex $donor] acclist [lindex $acceptor] {
> set dist [measure bond [list $donlist $acclist]]
> puts $out "$dist"
> }
> }
> $datom delete
> $aatom delete
> unset donlist
> unset acclist
> unset donor
> unset acceptor
> }
> flush $out
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> The output however gives quite large values as you can see below. What is
> the clue? Do I miss something? I also tried the script of Vlad
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/7974.html and get
> similar values. Is it beacuse of PBC?
> I need to say that if I do not loop over the frames it seems that the
> values are not as big as those given below. For single frames I got values
> close the 4.0 as given in the measure hbond command.
>
> Cheers
> Philipp
>
> ########################################################################
> OUPUT
> Frame: 1
>
> 47.980381012
> 33.2079467773
> 22.1528739929
> 7.2495970726
> 2.90595459938
> 18.4597625732
> 19.9984645844
> 35.3866729736
> 32.519241333
> 4.81217718124
> 34.2958450317
> 17.1391372681
> 28.0478878021
> 7.1199889183
> 30.2692966461
> 28.9558620453
> 3.51633763313
> 14.2537736893
> 10.5998191833
> 5.94095182419

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