From: Cosseddu, Salvatore (
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"


Salvatore Cosseddu
PhD student
Centre for Scientific Computing and School of Engineering
University of Warwick
Coventry CV4 7AL
United Kingdom
-----Original Message-----
From: on behalf of Casey Johnson
Sent: Tue 01/11/2011 20:46
Subject: vmd-l: Finding resname without using atomselect?
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?