From: Ashar Malik (asharjm_at_gmail.com)
Date: Thu Feb 12 2015 - 20:21:06 CST

When solvation is done, water molecules overlapping protein are deleted. So
there are chances that if you choose a random number it may not have a
water molecule against it. Also does your trajectory hold only water
molecules, otherwise you have to resolve the atomselect command to add
specific keywords indicating that the residue is suppose to be water and
NOT protein.
On Feb 13, 2015 2:54 PM, "Monika Madhavi" <monikamadhavi_at_gmail.com> wrote:

> Thank you everyone. When "" used, atomselect worked. However now I am
> getting a different error. My task is to randomly select a water molecule
> from a dcd file and write their coordinates to a new pdb file. I used the
> following script.
>
> set random [expr round(rand()*100)]
> set sel [atomselect top "resid $random"]
> $sel writepdb out.pdb
> $sel delete
>
> I am getting an error saying; atomsel: frame -1 out of range for molecule 1
>
> Can you please suggest a solution?
>
> Thanks
> Monika
>
> On Thu, Feb 12, 2015 at 2:53 PM, Tristan Croll <tristan.croll_at_qut.edu.au>
> wrote:
>
>> That will select every resid 5 from all the segments in your structure.
>> The keyword you're looking for is "residue" (or, if you like, "segname XXX
>> and resid 5").
>>
>>
>>
>> Tristan Croll
>> Lecturer
>> Faculty of Health
>> School of Biomedical Sciences
>> Institute of Health and Biomedical Engineering
>> Queensland University of Technology
>> 60 Musk Ave
>> Kelvin Grove QLD 4059 Australia
>> +61 7 3138 6443
>>
>> This email and its attachments (if any) contain confidential information
>> intended for use by the addressee and may be privileged. We do not waive
>> any confidentiality, privilege or copyright associated with the email or
>> the attachments. If you are not the intended addressee, you must not use,
>> transmit, disclose or copy the email or any attachments. If you receive
>> this email by mistake, please notify the sender immediately and delete the
>> original email.
>>
>>
>>
>> > On 12 Feb 2015, at 5:44 pm, Monika Madhavi <monikamadhavi_at_gmail.com>
>> wrote:
>> >
>> > Dear all,
>> >
>> > I need to select all the atoms of a particular water molecule from a
>> dcd file and write it's coordinates to a separate pdb/dcd file. Can I do
>> this using atomselect in vmd tcl? I tried the following command but it
>> doesn't work.
>> >
>> > set sel [atomselect top {resid 5}]
>> >
>> > Thank you.
>> > Monika
>> >
>> > --
>> > W.A.Monika Madhavi
>> > Lecturer (Probation),
>> > Department of Physics,
>> > University of Colombo.
>>
>
>
>
> --
> W.A.Monika Madhavi
> Lecturer (Probation),
> Department of Physics,
> University of Colombo.
>