From: Jerry Ebalunode (jebalunode_at_uh.edu)
Date: Wed Dec 01 2004 - 10:00:26 CST

Do you have a uniq atom name for atoms of resname HEX (e.g, if interested in
alanine ditribution, "CA" atomname is uniq and counting the number of CA
for every alanine with 5 A of protein would give you the total no of alanine
residues in that region). a script along this lines should do the trick
------------------------------------------------------------------------------------------------------------
vmd > set hex_count [atomeselect molid "resname HEX and atomname '?' and
within 5 of protein" frame i]

vmd > $hex_count num

----------------------------------------------------------------------
were ? is the unique atom name in HEX , while $hex_count num returns the
total number of hex in that viscinity

On Wednesday 01 December 2004 09:25 am, Lubos Vrbka wrote:
> good afternoon to everybody,
>
> i've used vmd for long time, but i've just started using it for more
> than only display... i tried to find a solution to my problem described
> below, but i didn't have luck :(
>
> i want to do analysis of distribution of given species around the
> protein in solution,e.g. i want to know how many hexanol molecules (HEX)
> are located within 5A of protein. so i use
> resname HEX and within 5 of protein
> (i tried another forms like (resname HEX) within 5 of protein, but these
> didn't work for me). this works fine, however the result is based on the
> frame that was displayed when this selection was entered... how can i
> force vmd (can i?) to recalculate the selection for every frame?
> interactively i click on "Apply" button in Graphical Representations
> dialog...
>
> vmd (correctly) displays only that parts of HEX residues that lie within
> the limit. from this it seems to me that the selection is based on
> atoms. i display the whole residues using
> same residue as (resname HEX and within 5 of protein)
> so vmd displays all residues that at least partially fulfill the
> distance constraint. however can i get somehow number of these residues?
>
> how can i do this analysis for the whole trajectory? i.e. i need vmd to
> print out to some text file nuber of residues satisfying the distance
> limit for each frame.
>
> i guess that this must have been asked and answered before... so any
> hints or pointers to the relevant information are greatly acknowledged.
>
> best regards,

-- 
Jerry Ebalunode
Ph.D. Candidate
RM 402F Houston Science Center
Phone: 713-743-8367
Dept. of Biology and Biochemistry
University of Houston
4800 Calhoun Road
Houston, TX 77204