VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jun 21 2006 - 13:29:44 CDT
- Next message: John Stone: "Re: align and superimpose crd structures."
- Previous message: John Stone: "Re:"
- In reply to: griadi_at_utalca.cl: "Average Structure and RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
You could make this script much much faster in two ways:
1) In cases (like this one) where you are not actually changing
which atoms are selected as you go along but just looping over
the frames to get coordinates, it is MUCH MUCH faster to create
the atom selection outside the loop, and then use "$sel frame $i"
to update the active frame for the selection, rather than creating
a new selection for each loop iteration.
2) The new versions of VMD (the released VMD 1.8.4, and later)
have a new command "measure avpos" which does 90% of what the
second half of your script does, but in compiled C, so it is
very fast. You'd still need to the script version if you're using
an older version of VMD, but for the new versions of VMD, the
"measure avpos" is the best way to do this. It can operate over
a specified frame range as well.
John Stone
vmd_at_ks.uiuc.edu
On Wed, Jun 21, 2006 at 12:28:33PM -0400, griadi_at_utalca.cl wrote:
> Dear all VMD users,
>
> I'd like to share with the comunity a little script for calculating the average
> position of all atoms in a selection (of atoms and frames) in a .dcd file. The
> program is in attachment and has two parts. The first, taken from
> someone else in the VMD list, aligns the chosen selection along the .dcd. The
> second part calculates the average along the chosen frames for all the atoms in
> the selection and saves it in a file called average.pdb in the working
> directory. Additionally, it calculates the RMSD respect to the aligned
> frame 0(taken from someone else in the VMD-list). That part can be modified to
> calculate the RMSD respect the average structure.
>
> The system variables can be changed in the first lines of the script.
>
> Important: If the simulation is large, the calculations will take a WHILE. Also,
> it's important to be careful in using the program because if you make a
> selection including more than one conected structure, the average structure will
> be the average of the whole selection AND NOT the average of the independent
> conected structures.
>
> Next step would be to develop a tk interface for it.
>
> Best regards to all,
> Gonzalo Riadi
> Center for Bioinformatics and Molecular Simulation.
> University of Talca.
>
>
>
>
> -------------------------------------------------
> Este mensaje fue enviado por: http://webmail.utalca.cl
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: John Stone: "Re: align and superimpose crd structures."
- Previous message: John Stone: "Re:"
- In reply to: griadi_at_utalca.cl: "Average Structure and RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]