From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jun 06 2011 - 13:45:23 CDT

You can query the list of residues associated with your selection
by doing something like this:
  set sel [atomselect top "your favorite selection"]
and then
  lsort -uniq [$sel get resid]
or
  lsort -uniq [$sel get residue]

Note that "residue" is the VMD internal numbering that avoids the problem
of duplicates that occur in some PDBs.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Jun 04, 2011 at 07:24:26PM -0700, Dennis N Bromley wrote:
> ok, another newbie question.
>
> I can *see* all the residues now, but how do I get VMD to tell me which
> residues I'm actually looking at? I'm figuring it must be some command
> line thing along the lines of
>
> resid of (my command from below)
>
> thanks!
> -denny-
>
> On Sat, Jun 4, 2011 at 11:09 AM, Dennis N Bromley <dbromley_at_uw.edu> wrote:
>
> in case anyone is searching the archives later, here is an update for
> finding hydrophobic contacts.
>
> same residue as ((name "C.*") and index > 30 and within 5.4 of (index <
> 31 and name "C.*") )
>
> again, however, more elegant solutions are always invited. :)
>
> -denny-
>
> On Sat, Jun 4, 2011 at 10:27 AM, Dennis N Bromley <dbromley_at_uw.edu>
> wrote:
>
> not hugely elegant, but I think this will work.
>
> Pymol combined both structures into a single pdb for me but put my
> ligand as atoms 1-31 and the protein atoms as 32 ->. So, no chains.
> However, I did find that this worked:
>
> same residue as (within 5.4 of (index 0 to 30))
>
> Again, a little klugey. But it will make the figure. :)
>
> Any advice for a more elegant solution that doesn't involve trolling
> through the pdb file in notepad to discover atoms numbers would be
> much appreciated. :)
>
> -denny-
>
> On Sat, Jun 4, 2011 at 10:14 AM, Dennis N Bromley <dbromley_at_uw.edu>
> wrote:
>
> Hi Sajad,
>
> Thanks for the tip! I currently have two pdb files - actually one
> pdb file with the receptor and one pdbqt file from AutoDock Vina
> with multiple ligand poses in it. If I assume that I'm taking the
> best pose, I could reduce that to one and then combine the best pose
> with the receptor into a single PDB.
>
> Is there a simple way to handle the twp pdb file setup like I have?
> Or is combining them together the best way to go?
>
> thanks!
> -denny-
>
> On Sat, Jun 4, 2011 at 6:26 AM, sajad falsafi
> <sajad.falsafi_at_yahoo.com> wrote:
>
> Hi denny,
> Please let me know that you have two PDB files or only one PDB.
> if you have only one PDB file, you should type :
> "chain X and same residue as within 5 of chain Y"
> (istead of chain X you should type chain of receptor and istead of
> chain Y type chain of ligand)
> also for better analysis you can merge two of the PDB files into
> single PDB.
> hope this helps you
> Sajad
>
> ----------------------------------------------------------------------
>
> From: Dennis N Bromley <dbromley_at_uw.edu>
> To: vmd-l_at_ks.uiuc.edu
> Sent: Sat, June 4, 2011 7:57:58 AM
> Subject: vmd-l: how do I show contacts with XXX angstroms between
> a protein and a ligand?
> Hi everyone,
>
> I'm sorry if this is a common newbie question - I've looked
> everywhere including the mailing list archives. Someone did ask
> this question a while ago but the response was "have you tried
> 'within'?" which pointed me in the right direction but alas, I'm
> still having problems.
>
> Anyway, if someone could help me with the syntax I would be
> forever grateful. I have a protein call 'receptor' and a small
> molecule called 'ligand' and I'm trying to show the protein side
> chains that interact with the ligand atoms. In spirit I want to
> write "same residue as within 5 of (molname 'ligand)'" but I can't
> seem to figure out exactly how to put the syntax together.
>
> Again, sorry if this has been answered somewhere and I just missed
> it.
>
> thanks!
> -denny-
>
>

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