From: Randy J. Zauhar (r.zauhar_at_usciences.edu)
Date: Wed Mar 21 2018 - 11:08:46 CDT
Thanks Giacomo, I checked carefully, and there was no problem with the atom selection in the TCL, I had a downstream error that I refused to see until I had exhausted every possibility!
Randy
Randy J. Zauhar, PhD
Prof. of Biochemistry
Dept. of Chemistry & Biochemistry
University of the Sciences in Philadelphia
600 S. 43rd Street
Philadelphia, PA 19104
Phone: (215)596-8691
FAX: (215)596-8543
E-mail: r.zauhar_at_usciences.edu<mailto:r.zauhar_at_usciences.edu>
On Mar 20, 2018, at 6:05 PM, Giacomo Fiorin <giacomo.fiorin_at_gmail.com<mailto:giacomo.fiorin_at_gmail.com>> wrote:
Hi Randy,
On Tue, Mar 20, 2018 at 5:47 PM, Randy J. Zauhar <r.zauhar_at_usciences.edu<mailto:r.zauhar_at_usciences.edu>> wrote:
Hi wise ones,
and wise-body-part ones, too.
I know his has been asked before, but I could not get a coherent answer plowing through the thread I found.
I am trying to simply extract all the waters from a trajectory within 5 A of my ligand, for every frame. Why does the code below not work?
In theory it should, but if the protein drifts significantly, I found it more convenient to also translate the coordinates. Qwrap does that and the wrapping symultaneously: https://github.com/jhenin/qwrap
At any rate, I would definitely try the selection through a graphical representation to make sure.
I have tried this with and without the pbc wrap, same result, have also modified the atom selection - I always get a waters that are far away (like ~18 A)
Thanks!
Randy
————————
mol load psf 5U11_7PS.SWAP.CENTERED.XTALH2O.SOLVATED.IONIZED.psf dcd 5U11.SWAP.XTALH2O.RESTRAIN.EQUIL.dcd
package require pbctools
pbc wrap -all -compound res -center com -centersel "segname LIG"
set fp [ open "activeSiteWaters4.txt" w ]
set lastframe [ molinfo top get numframes ]
for { set frame 1 } { $frame <= $lastframe } { incr frame 1 } {
set select [ atomselect top "segname WT1 and oxygen within 5. of (segname LIG) " frame $frame ]
For speed, you could declare the selection outside the loop, and run $select frame $frame. Also, don't forget $select delete at the end.
$select update
set watlist [ $select get {resid name x y z}]
puts $fp "#$frame"
foreach water $watlist {
set resid [ lindex $water 0 ]
set atom [ lindex $water 1 ]
set X [ lindex $water 2 ]
set Y [ lindex $water 3 ]
set Z [ lindex $water 4 ]
puts $fp "$resid\t$atom\t$X\t$Y\t$Z"
}
}
close $fp
————————
Randy J. Zauhar, PhD
Prof. of Biochemistry
Dept. of Chemistry & Biochemistry
University of the Sciences in Philadelphia
600 S. 43rd Street
Philadelphia, PA 19104
Phone: (215)596-8691
FAX: (215)596-8543
E-mail: r.zauhar_at_usciences.edu<mailto:r.zauhar_at_usciences.edu><mailto:r.zauhar_at_usciences.edu<mailto:r.zauhar_at_usciences.edu>>
“Yeah the night is gonna fall, and the vultures will surround you /
And when you’re lookin’ in the mirror what you see is gon’ astound you"
— Death Cab for Cutie, “Monday Morning"
-- Giacomo Fiorin Associate Professor of Research, Temple University, Philadelphia, PA Contractor, National Institutes of Health, Bethesda, MD http://goo.gl/Q3TBQU https://github.com/giacomofiorin
This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:56 CST