VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Sep 08 2005 - 10:39:34 CDT
- Next message: John Stone: "Re: index"
- Previous message: VISWANADHA SRIDHARA: "index"
- In reply to: VISWANADHA SRIDHARA: "index"
- Next in thread: John Stone: "Re: index"
- Maybe reply: John Stone: "Re: index"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I'd suggest modifying the selection so that you're just selecting
the waters, and and then query the resids and sort unique. Something
like this:
set sel [atomselect top "water and exwithin 3 of protein"]
set residlist [lsort -unique [$sel get resid]]
>From there you can write the contents of $residlist to a file if you wish.
John Stone
vmd_at_ks.uiuc.edu
On Thu, Sep 08, 2005 at 11:29:54AM -0400, VISWANADHA SRIDHARA wrote:
> Hi VMD users,
>
> I am trying to get the resid's of the molecules in a trajectory.
>
> The script I wrote I have seen in VMD tutorial is
>
> set number_frames [molinfo top get numframes]
> set selection [atomselect top "exwithin 3 of protein"]
> for {set i 0} {$i < $number_frames} {incr i} {
> $selection frame $i
> $selection update
> $selection writepdb water_$i.pdb
> }
>
> Now I want to find the residue ID's of the water molecules in water_$i.pdb
> files.
> Is there any straight coding which can be incorporated in the script to
> directly get residue ID's in a notepad/wordpad file.
> I can use gromacs or other tool to convert each water_$i.pdb file to
> water_$i.ndx file, but can I use "$selection get index" and then store that
> in a file(ofcourse not pdb).
>
> Thanks in advance and Best Regards,
> Viswam.
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: John Stone: "Re: index"
- Previous message: VISWANADHA SRIDHARA: "index"
- In reply to: VISWANADHA SRIDHARA: "index"
- Next in thread: John Stone: "Re: index"
- Maybe reply: John Stone: "Re: index"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]