From: Cosseddu, Salvatore (S.M.Cosseddu_at_warwick.ac.uk)
Date: Tue Nov 01 2011 - 18:35:22 CDT

Many I think.

Try something like

set prot [atomselect mol protein] ;# be careful, read protein macro
                                   # on the manual
set reslist [$prot get resname]
$prot delete

set RESNAME_you_are_looking_for "GLY" ;# GLY is only an example

if {[lsearch $reslist $RESNAME_you_are_looking_for] >= 0} {
        puts "Hey, I'm here!"
} else {
        puts "I'm sorry, I'm out"
}

Regards

--
Salvatore Cosseddu
PhD student
Centre for Scientific Computing and School of Engineering
University of Warwick
Coventry CV4 7AL
United Kingdom
email: S.M.Cosseddu_at_warwick.ac.uk
-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu on behalf of Casey Johnson
Sent: Tue 01/11/2011 20:46
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l: Finding resname without using atomselect?
 
Hello,
I'm wondering if it's possible to determine if a specific residue is found
(via tcl script) without using atomselect.  Currently I'm doing this:
if {[[atomselect top "resname NAME"] num] == 0}
Is there a more refined method?
Thanks