From: Justin Gullingsrud (jgulling_at_mccammon.ucsd.edu)
Date: Tue May 04 2004 - 15:07:44 CDT

If you want to find H-bond donors and acceptors, there is a built-in VMD
command called "measure hbonds" for just that purpose. Check here for
details:

http://www.ks.uiuc.edu/Research/vmd/current/ug/node121.html

Cheers,
Justin

On Tue, May 04, 2004 at 11:20:20AM -0700, Brian Bennion wrote:
> Hi Ahmet,
>
> That script is pretty involved. Now I understand what you want to do.
> The most robust way I have done the hbond calculation is to make a list
> of all donors and acceptors to start with.
> But this is already known in VMD to a limited extent, ie all bonds are
> stored at load up.
>
> It is a matter of accessing that bond list in a
> coherent way that makes the script a little tricky.
>
> I would suggest looking at the way bond-lists are stored and accessed with
> tcl commands like molinfo etc ....
>
>
> Regards
> Brian
>
>
> On Tue, 4 May 2004, Ahmet Bakan wrote:
>
> > Hi Brian and All,
> >
> > I thank you a lot and feel bed to cause a large email traffic for such a
> > simple question :(
> > I am sending the TCL script and showed where and why I want to make this
> > selection. If you have any better ideas, I would like to hear.
> >
> > Thanks again,
> >
> > Ahmet
> >
> > ==========ABC==========
> > Ahmet Bakan
> > Chemistry, Junior
> > Koc University
> > abakan_at_ku.edu.tr
> > ICQ #86167698
> > http://home.ku.edu.tr/~abakan
> >
> > -----Original Message-----
> > From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of
> > Brian Bennion
> > Sent: Monday, May 03, 2004 10:14 PM
> > Cc: 'VMD-L'
> > Subject: RE: vmd-l: Selection problem on TkCon
> >
> >
> > Can you just add another macro for oxygen, and sulfur?
> >
> > ie set connected [atomselect top "((same residue as ([$HATOM text])) and
> > nitrogen) or ((same residue as ([$HATOM text])) and oxygen)"]
> >
> > Or have am I just completely confused?
> >
> > Brian
> >
> >
> >
> > On Mon, 3 May 2004, Ahmet Bakan wrote:
> >
> > > Hi Brian and All,
> > >
> > > set connected [atomselect top "(same residue as ([$HATOM text])) and
> > > nitrogen"]
> > > brings me the nitrogen atom that my H is bonded to and other N atoms if
> > > there is.
> > > What I exactly need is the atom H is bonded to, which may be any types O
> > or
> > > N.
> > > I load PSF file and it has the list of each bond, is there a command makes
> > > use of this?
> > >
> > > Thanks,
> > >
> > > Ahmet
> > >
> > > ==========ABC==========
> > > Ahmet Bakan
> > > Chemistry, Junior
> > > Koc University
> > > abakan_at_ku.edu.tr
> > > ICQ #86167698
> > > http://home.ku.edu.tr/~abakan
> > >
> > > -----Original Message-----
> > > From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf
> > Of
> > > Brian Bennion
> > > Sent: Monday, May 03, 2004 6:14 PM
> > > Cc: 'VMD-L'
> > > Subject: RE: vmd-l: Selection problem on TkCon
> > >
> > > Hi Ahmet,
> > >
> > > Just add another qualifier in your selection statement or lsort the list
> > > that "connected" gives you.
> > >
> > > ie..
> > >
> > > set connected [atomselect top "(same residue as ([$HATOM text])) and
> > > nitrogen"]
> > >
> > >
> > > Regards,
> > > Brian
> > >
> > > On Mon, 3 May 2004, Ahmet Bakan wrote:
> > >
> > > > Hi Justin and All,
> > > >
> > > > I need the index of the single atom that hydrogen is bonded to.
> > > > Like this
> > > > -NH-CH2-CO-O-
> > > > I have the index of H bonded to N, hundereds of H similar indices.
> > > > I need index of N atom in this example.
> > > >
> > > > I tried this:
> > > > set HATOM [atomselect top "index 547"]
> > > > Result: H
> > > > set connected [atomselect top "same residue as ([$HATOM text])"]
> > > > Result: NH1 H CT1 HB CT2 HA HA CT2 HA HA CC O NH2 H H C O
> > > > set connected [atomselect top "same bond as ([$HATOM text])"]
> > > > Result: nothing happens
> > > >
> > > > Does anyone have idea?
> > > > Thanks,
> > > >
> > > > Ahmet
> > > >
> > > >
> > > > ==========ABC==========
> > > > Ahmet Bakan
> > > > Chemistry, Junior
> > > > Koc University
> > > > abakan_at_ku.edu.tr
> > > > ICQ #86167698
> > > > http://home.ku.edu.tr/~abakan
> > > >
> > > > -----Original Message-----
> > > > From: Justin Gullingsrud [mailto:jgulling_at_mccammon.ucsd.edu]
> > > > Sent: Monday, May 03, 2004 11:36 AM
> > > > To: Ahmet Bakan
> > > > Cc: VMD-L
> > > > Subject: Re: vmd-l: Selection problem on TkCon
> > > >
> > > > Hi,
> > > >
> > > > On Mon, May 03, 2004 at 03:55:43AM +0300, Ahmet Bakan wrote:
> > > > > Hi All,
> > > > >
> > > > >
> > > > >
> > > > > I have a selection of Hydrogen atoms and I want to get the list of
> > atoms
> > > > > that Hydrogens in my selection are attached to. How can this be done
> > on
> > > > > TkCon?
> > > >
> > > > I assume you have a selection that you created from the text console,
> > > > something like this:
> > > >
> > > > set sel [atomselect top "hydrogen and resname ALA"]
> > > >
> > > > Whatever the selection is, you can find all the atoms in the same
> > > > residue as the selection by typing the following:
> > > >
> > > > set connected [atomselect top "same residue as ([$sel text])"]
> > > >
> > > > You can then write out a list of atoms in the selection to a file with:
> > > >
> > > > set fd [open connatoms.ind w]
> > > > foreach ind [$connected list] { puts $fd $ind }
> > > > close $fd
> > > >
> > > > Note that the indicies written to the file will be one smaller than the
> > > > corresponding atom in a pdb file; i.e., they will be 0-based rather than
> > > > 1-based.
> > > >
> > > > Cheers,
> > > > Justin
> > > >
> > > > >
> > > > >
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Ahmet
> > > > >
> > > > >
> > > > >
> > > > > ==========ABC==========
> > > > >
> > > > > Ahmet Bakan
> > > > >
> > > > > Chemistry, Junior
> > > > >
> > > > > Koc University
> > > > >
> > > > > abakan_at_ku.edu.tr
> > > > >
> > > > > ICQ #86167698
> > > > >
> > > > > http://home.ku.edu.tr/~abakan
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > >
> > > > Tenth is 10 spots too low as far as I'm concerned. -- George W. Bush
> > > >
> > >
> > > *****************************************************************
> > > **Brian Bennion, Ph.D. **
> > > **Computational and Systems Biology Division **
> > > **Biology and Biotechnology Research Program **
> > > **Lawrence Livermore National Laboratory **
> > > **P.O. Box 808, L-448 bennion1_at_llnl.gov **
> > > **7000 East Avenue phone: (925) 422-5722 **
> > > **Livermore, CA 94550 fax: (925) 424-6605 **
> > > *****************************************************************
> > >
> > >
> >
> > *****************************************************************
> > **Brian Bennion, Ph.D. **
> > **Computational and Systems Biology Division **
> > **Biology and Biotechnology Research Program **
> > **Lawrence Livermore National Laboratory **
> > **P.O. Box 808, L-448 bennion1_at_llnl.gov **
> > **7000 East Avenue phone: (925) 422-5722 **
> > **Livermore, CA 94550 fax: (925) 424-6605 **
> > *****************************************************************
> >
> >
>
> *****************************************************************
> **Brian Bennion, Ph.D. **
> **Computational and Systems Biology Division **
> **Biology and Biotechnology Research Program **
> **Lawrence Livermore National Laboratory **
> **P.O. Box 808, L-448 bennion1_at_llnl.gov **
> **7000 East Avenue phone: (925) 422-5722 **
> **Livermore, CA 94550 fax: (925) 424-6605 **
> *****************************************************************

-- 
Tenth is 10 spots too low as far as I'm concerned.  -- George W. Bush