From: Sasthi Charan Mandal (sasthi.phys_at_gmail.com)
Date: Thu Aug 02 2018 - 00:17:46 CDT

Thank you Ashar for providing the script. I will try and let you know.

On Wed, Aug 1, 2018 at 8:52 PM, Ashar Malik <asharjm_at_gmail.com> wrote:

> This is not tested. I am writing this on the fly - but something similar
> if not the same should work for you...
>
> # define range of residues
> # for each residue in range
>
> set fid [open vals.dat a]
> set nf [molinfo top get numframes]
> set res_in_ref [atomselect top "resid 15"]
> for {set i 0} {$i<$nf} {incr i} {
>
> set in_fr_res_sel [atomselect top "resid 15" frame $i]
>
> set mx_ [measure fit $in_fr_res_sel $res_in_ref]
>
> $in_fr_res_sel move $mx_
> set rmsd_ [measure rmsd $in_fr_res_sel $res_in_ref]
> puts $fid $i\t$rmsd_
> $in_fr_res_sel delete
>
> }
> $res_in_ref delete
> close $fid
>
> The above will compute the rmsd of residue 15 -- you can have this in a
> nested loop and iterate the outer loop over all the residues.
> The number that will be returned will be the average movement of all atoms
> in residue -
>
> However -- YOU should not be doing this. Since you are aligning each
> residue optimally (using measure fit) - it not be correct in the context of
> the whole structure. Perhaps you could pre-align your trajectory using the
> entire structure and then remove the "measure fit" bit ...
>
> Anyway - as I mentioned before I didn't test this script but it should be
> relatively straightforward to trouble shoot. Write back if something isn't
> clear.
>
>
>
>
> On Wed, Aug 1, 2018 at 10:53 PM Sasthi Charan Mandal <
> sasthi.phys_at_gmail.com> wrote:
>
>> Dear Ashar,
>> Thanks for your suggestion. I had a doubt about rmsd and rmsf and
>> now it is cleared. What I want to calculate is the rmsd of each residue
>> over a particular time period and for all frames within that time period.
>> But using the above script which I shared does not give the expected
>> result. Is anything wrong in the script?
>> Thanks
>>
>> On Wed, Aug 1, 2018 at 2:09 PM, Ashar Malik <asharjm_at_gmail.com> wrote:
>>
>>> Again the same problem.
>>>
>>> You use
>>>
>>> [measure rmsd $sela $selb]
>>>
>>> it should be measure rmsf
>>>
>>> Secondly - this is not how rmsf is calculated.
>>>
>>> the simplest way to calculate the RMSF is
>>>
>>> load your trajectory
>>> make 1 selection (just 1) holding your atoms of interest. (eg. roi_atoms)
>>>
>>> now use
>>>
>>> measure rmsf $roi_atoms
>>>
>>> if you use the above command all frames in your trajectory will be used
>>> to calculate the rmsf.
>>> if you want to limit them as I think you are trying to do (not exactly
>>> sure) add frame numbers
>>>
>>> so
>>>
>>> measuer rmsf $roi_atoms 50 60
>>>
>>> with the above command only frame 50 through 60 will be used.
>>>
>>> keep in mind the difference in math between RMSD and RMSF.
>>> RMSD is per frame -- so you get a trend
>>> RMSF is per set of frames -- so you will get just 1 value (doesn't
>>> matter if you use 50 frames or 5000).
>>>
>>> check this page for more details:
>>>
>>> https://www-s.ks.uiuc.edu/Research/vmd/vmd-1.9.1/ug/node136.html
>>>
>>>
>>> On Wed, Aug 1, 2018 at 4:17 PM Sasthi Charan Mandal <
>>> sasthi.phys_at_gmail.com> wrote:
>>>
>>>> Oh I am sorry. It will be rmsf. So it would be very much helpful for me
>>>> if you would provide me the tcl script. I have one script but using this
>>>> script I could not get the expected result. Could you please check my
>>>> script and let me know what is wrong here?
>>>> The script is:
>>>> set outDataFile [open rmsf.dat w]
>>>> for {set r 491} {$r <= 512} {incr r} {
>>>> set sela [atomselect top "resid $r"]
>>>> set selb [atomselect top "resid $r"]
>>>> $sela frame 0
>>>> for {set f 0} {$f<=9990} {incr f} {
>>>> $selb frame $f
>>>> display update
>>>> set val [measure rmsd $sela $selb]
>>>> set resid $r
>>>> puts $outDataFile "$resid $f $val"
>>>> }
>>>> }
>>>> close $outDataFile
>>>> return
>>>> }
>>>>
>>>> On Wed, Aug 1, 2018 at 6:10 AM, Ashar Malik <asharjm_at_gmail.com> wrote:
>>>>
>>>>> The subject of the mail is asking for rmsf where as in the email you
>>>>> say rmsd. So which one?
>>>>>
>>>>> Rmsd and rmsf can both be obtained using the "measure" command.
>>>>>
>>>>> Remember to remove translational and rotational effects from your
>>>>> system prior to their use.
>>>>>
>>>>> Write back if this doesn't help and an example "script" can be
>>>>> provided.
>>>>>
>>>>> On Aug 1, 2018 00:06, "Sasthi Charan Mandal" <sasthi.phys_at_gmail.com>
>>>>> wrote:
>>>>>
>>>>> I want to calculate the rmsd of each base pair of dna over a specified
>>>>> time.. So if anyone have the script I will be thankful to you if you
>>>>> provide me.
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Best,
>>> /A
>>>
>>
>>
>
> --
> Best,
> /A
>