From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Wed May 07 2014 - 01:56:50 CDT

 

Von: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] Im Auftrag von Joshua Skootsky
Gesendet: Dienstag, 6. Mai 2014 20:39
An: Ana Celia Vila Verde
Cc: Ramin Ekhteiari; VMD Mailing List
Betreff: Re: vmd-l: number of water molecules within 5 angstroms of the ligand

 

water within 10 of protein and oxygen

 

is different from

 

water and oxygen within 10 of protein

 

No it’s in fact the same! Both will return the same number of water oxygen atoms. If he wants to also count “half” waters, the “same residue as” method would be usable.

 

The first will give you the number of atoms in the water, the second will give you the number of water molecules.

 

Your code is current like the first, counting the number of atoms in water molecules that are within 7 Angstroms of oxygen molecules in your chosen protein residue.

 

The relevant line of code should be re-written like this:

 

set a [atomselect top "(water and oxygen within 7 of ($ligand) )"]

 

On Tue, May 6, 2014 at 2:35 AM, Ana Celia Vila Verde <acavilaverde_at_gmail.com> wrote:

Dear Ramin,

You need to update the selection:

set frames [molinfo top get numframes]
set fp [open "waters.txt" w]
set ligand "protein and resid 37"
for {set i 0} {$i < $frames} {incr i} {
                puts "Frame: $i"
                set a [atomselect top "(water within 7 of ($ligand) and oxygen)"]
                $a frame $i
                $a update
                set num [$a num]
                puts $fp "$i $num"
                $a delete
}

close $fp

On 5/5/14 8:05 PM, Ramin Ekhteiari wrote:

Dear Norman,
I employed this script but it did not change the frames the only it writes the frame No.

Cheers,
Ramin.

set frames [molinfo top get numframes]

set fp [open "waters.txt" w]

set ligand "protein and resid 37"

for {set i 0} {$i < $frames} {incr i} {
                puts "Frame: $i"
                set a [atomselect top "(water within 7 of ($ligand) and oxygen)"]
                set num [$a num]
                puts $fp "$i $num"
                $a delete
}

close $fp
Out put is :
0 11
1 11
2 11
3 11
4 11
5 11
6 11
7 11
8 11
9 11
10 11
11 11
12 11
13 11
14 11
15 11
16 11
17 11
18 11
19 11
20 11
21 11
22 11
23 11
24 11
25 11
26 11
27 11
28 11
29 11
30 11
..
..
..

 

On , Ramin Ekhteiari <mailto:ramin_ekh_at_yahoo.com> <ramin_ekh_at_yahoo.com> wrote:

Dear Norman,
I employed this script but it did not change the frames the only it writes the frame No.

Cheers,
Ramin.

set frames [molinfo top get numframes]

set fp [open "waters.txt" w]

set ligand "protein and resid 37"

for {set i 0} {$i < $frames} {incr i} {
                puts "Frame: $i"
                set a [atomselect top "(water within 7 of ($ligand) and oxygen)"]
                set num [$a num]
                puts $fp "$i $num"
                $a delete
}

close $fp
Out put is :
0 11
1 11
2 11
3 11
4 11
5 11
6 11
7 11
8 11
9 11
10 11
11 11
12 11
13 11
14 11
15 11
16 11
17 11
18 11
19 11
20 11
21 11
22 11
23 11
24 11
25 11
26 11
27 11
28 11
29 11
30 11
..
..
..

 

On Monday, May 5, 2014 2:52 PM, Axel Kohlmeyer <mailto:akohlmey_at_gmail.com> <akohlmey_at_gmail.com> wrote:

On Mon, May 5, 2014 at 4:47 AM, Ramin Ekhteiari
<ramin_ekh_at_remove_yahoo.com> wrote:
> Hi dear all,
>
> I would like to calculate number of water molecules within 5 angstroms of
> the ligand
> which is bonded to the protein for each step during MD.
> I tried to do it for one step, but not for all as loop at TCL.
>
> So would you please advise me on how to do it.

examples for how to do a loop over all trajectory frames are in the
user's guide.

>
> Would be grateful for any advice.
>
>
> Cheers,
> Ramin.

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy. 
 
 
 
 
 
-- 
Joshua Skootsky
(415) 683-9354 | joshua.skootsky_at_gmail.com
---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com