VMD-L Mailing List
From: fan li (fanliqmul_at_gmail.com)
Date: Thu Aug 16 2018 - 05:47:22 CDT
- Next message: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Previous message: Norman Geist: "AW: Userani.tcl script jumps frame after no play"
- Next in thread: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Reply: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Reply: Axel Kohlmeyer: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi everyone
I am trying to select atoms with specific region of SOL of each frame and
change the selected atom's resname. I list part of my code below.
############################################
set zmin 30.3
set nf [molinfo top get numframes]
for {set i 0} {$i < [expr (3-1)]} {incr i} {
set sel_water($i) [atomselect top "resname SOL and z<$zmin"]
$sel_water($i) frame $i
#reset the resname of the selected water
$sel_water($i) set resname den
$sel_water($i) writegro "water_interest$i.gro"
}
########################################
This "set sel_water($i) [atomselect top "resname SOL and z<$zmin"]"
selection is not working properly as the outcome is not the region I
specified.
Then I removed the "z<$zmin" and changed it to "set sel_water($i)
[atomselect top "resname SOL"]", it woks fine as the entire water is
selected.
So could someone tell me why the selection is not working with the
position selected condition is not working?
As position selected condition changes over each frame in the actual code,
so I can not put the selection outside the loop?
Fan
- Next message: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Previous message: Norman Geist: "AW: Userani.tcl script jumps frame after no play"
- Next in thread: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Reply: Ashar Malik: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Reply: Axel Kohlmeyer: "Re: Atomselection with the position selected conditions inside the loop is not working properly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]