VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Thu Mar 08 2012 - 13:07:49 CST
- Next message: Murpholino Peligro: "get avg ca distance"
- Previous message: John Stone: "Re: make movies with user-defined script"
- In reply to: John Stone: "Re: Individual components of RMSD?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Thu, Mar 8, 2012 at 1:15 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> Hi,
> Besides using awk, one could also do this easily with a short Tcl
> script looping over the atoms in a selection to compute the same values.
> The built-in measure commands don't currently have a mode to allow you
> to compute each of the X, Y, or Z components independently, but if enough
> people wanted such a feature it could be implemented. We've just never
> had anyone ask for this before.
a simple (to me) way to do this inside of VMD
without much hacking is probably (in pseudo code)
set sel [atomselect top all]
<loop over all frames> {
$sel set user1 [$sel get x]
$sel set user2 [$sel get y]
$sel set user3 [$sel get z]
$sel set y 0.0
$sel set z 0.0
}
<compute rmsd rmsf> for x only
<loop over all frames> {
$sel set x 0.0
$sel set y [$sel get user2]
}
<compute rmsd rmsf> for y only
<loop over all frames> {
$sel set y 0.0
$sel set z [$sel get user3]
}
<compute rmsd rmsf> for z only
<loop over all frames> {
$sel set x [$sel get user1]
$sel set y [$sel get user2]
}
$sel set user1 0.0
$sel set user2 0.0
$sel set user3 0.0
$sel delete
axel.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Tue, Mar 06, 2012 at 06:31:31PM -0800, Andrew Jewett wrote:
>> I've no idea if you can do it from inside VMD, but once you have the
>> two molecules superimposed in VMD, you can save the coordinates of the
>> two structures (I recommend using XYZ format), paste them together
>> into a single file, (using unix "paste" command), and then compute the
>> x, y, or z component of the RMSD directly using awk.
>>
>> The commands would be something like:
>>
>> paste -d' ' file1.xyz file2.xyz | tail -n +3 > file12.dat
>> awk '{if (NF==8) {n++; sumsq+=($2-$6)^2}} END{print(sqrt(sumsq/n))}' <
>> file12.dat
>>
>> (I'm guessing this gives you the RMSD in the X component. For the Y
>> and Z components, try sumsq+=($3-$7)^2, and sumsq+=($4-$8)^2)
>>
>> I hope this helps.
>> Cheers
>>
>> Andrew
>>
>> On Tue, Mar 6, 2012 at 9:36 AM, patrick wintrode <pat_wde2_at_yahoo.com> wrote:
>> >
>> > Hi all.
>> >
>> > Is there a way to write out the x, y and z components of RMSD or RMSF
>> > separately in VMD?
>> >
>> > Thanks.
>> >
>> > Patrick L. Wintrode
>> > Associate Professor
>> > Dept. of Pharmaceutical Sciences
>> > University of Maryland School of Pharmacy
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science and Technology Temple University, Philadelphia PA, USA.
- Next message: Murpholino Peligro: "get avg ca distance"
- Previous message: John Stone: "Re: make movies with user-defined script"
- In reply to: John Stone: "Re: Individual components of RMSD?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]