From: Brian Bennion (brian_at_youkai.llnl.gov)
Date: Mon May 03 2004 - 14:14:10 CDT

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