VMD-L Mailing List
From: Jawahar Neelankatan (neelankatan_j_at_yahoo.com)
Date: Fri Mar 02 2007 - 08:09:27 CST
- Next message: Axel Kohlmeyer: "Re: Updating atomselection from frame to frame"
- Previous message: Axel Kohlmeyer: "Re: Calculating dipole moment of protein"
- In reply to: Axel Kohlmeyer: "Re: Updating atomselection from frame to frame"
- Next in thread: Axel Kohlmeyer: "Re: Atomselection in NAMDENERGY"
- Reply: Axel Kohlmeyer: "Re: Atomselection in NAMDENERGY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Axel,
Thanks for the info. That really helps. The NAMDENERGY plugin calculates energies between atoms defined in two selections, $sel1 and $sel2. It does so for all frames in a trajectory. Does it update the atom selections using the "update" command or does it basically just calculate energies between the same two groups of atoms defined initially ? If I use an atomselection criterion (such as all atoms within a fixed radius) that can lead to varying results from frame to frame, does NAMDENERGY update the selections from frame to frame or does it just use the same set of atoms for all frames ?
-Jawahar
Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu> wrote: On Fri, 2 Mar 2007, Jawahar Neelankatan wrote:
JN> Hi all,
JN> In order to save memory and avoid using the atomselect command for
JN> each frame in a trajectory, I usually do the atomselection at the
this only waste memory, if you do not do a $sel delete after you
are done with using a selection.
JN> beginning and use either "$sel frame $i" or "$sel update" to update
JN> the atomselection for each frame.
JN> My question is this: exactly how does the update process work ? My
JN> guess is that if X atoms are selected in the initial atomselect
JN> command, the "update" command updates the coordinates of those X
JN> atoms in each new frame. So, if the atomselect command has a
JN> selection criterion such as "within 12 of ion", then all atoms
JN> within a sphere of radius 12 Angstrom around the ion are selected.
JN> Let's assume there are X atoms fitting this criterion, in the first
JN> frame. When the frame is switched to another frame and the "update"
JN> command is used, is it those same X atoms that are updated, or is
JN> the atomselection command repeated for that particular frame ? My
JN> concern is that, in the new frame, an atom that was previously
JN> within the 12 Angstrom sphere might have moved out of the sphere, so
JN> it is pointless to update its coordinates.
no, you misunderstood the meaning of frame and update.
$sel frame XX
takes the current selection of atoms and updates the coordinates
to those at frame XX. so for any selection where the atoms will
not change this is sufficient to get the new coordinates.
$sel update
however, will recompute which atoms belong into the selection
at the current frame. so you don't have to worry about atoms
having moved outside of the selection.
in terms of performance. $sel frame XX is fast, whereas
$sel update can be time consuming, so it is to be avoided
if not needed to have scripts run with maximum performance.
cheers,
axel.
JN>
JN> -Jawahar.
JN>
JN>
JN> ---------------------------------
JN> Have a burning question? Go to Yahoo! Answers and get answers from real people who know.
-- ======================================================================= Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu Center for Molecular Modeling -- University of Pennsylvania Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323 tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425 ======================================================================= If you make something idiot-proof, the universe creates a better idiot. --------------------------------- Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.
- Next message: Axel Kohlmeyer: "Re: Updating atomselection from frame to frame"
- Previous message: Axel Kohlmeyer: "Re: Calculating dipole moment of protein"
- In reply to: Axel Kohlmeyer: "Re: Updating atomselection from frame to frame"
- Next in thread: Axel Kohlmeyer: "Re: Atomselection in NAMDENERGY"
- Reply: Axel Kohlmeyer: "Re: Atomselection in NAMDENERGY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]