From: Chitrak Gupta (chgupta_at_mix.wvu.edu)
Date: Thu Aug 17 2017 - 17:13:45 CDT

Hi Ashar,

Thanks a lot for taking the time to do this. Really appreciate it. The
explanation for the modifications you made to the tcl script was also
extremely helpful.

Regards,
Chitrak.

On Thu, Aug 17, 2017 at 2:32 PM, Ashar Malik <asharjm_at_gmail.com> wrote:

> So I am not sure how 13000 frames translate to 52ns - when you yourself
> said that this is a 4ns simulation????
>
> Secondly I don't think I have ever used the timeline plugin but I assume
> that the author is correct to put frames as opposed to time because all
> trajectories are calclulated with different frequencies and to display time
> the user would have to input the "save to trajectory" frequency and the
> time step used. So I don't really see why one would have to convert it.
>
> If you are bent on doing this, there is the easy way -- just save the
> image and edit it with GIMP or something.
>
> Assuming you want to do it for many graphs see below:
>
> I have attached a file. Replace your timeline plugin file with this one.
>
> Changes are in line 3677 (minor label edit)
>
> 3941-3959 -- printRedraw
> 7038-7058 -- drawHorzScale
> 7742-7760 -- printPicRedraw
>
> The change is the same in the above three blocks.
>
> The following three lines are added:
>
> set dcdfreq85 1000
> set ts85 2
> set fn85 [expr double($frameNum*$dcdfreq85*$ts85)/1000]
>
> The textWidth is set according to the new number:
>
> set textWidth [font measure $monoFont -displayof $w $fn85]
>
> and then the canvas is asked to draw out the new variables value
>
> $wp.large create text ...
>
> Note:
>
> I hard coded the dcdfreq85 variable to 1000 and ts85 to 2. These need to
> be changed according to your simulation.
> Since I am not sure if you understand what you are doing -- when the fn85
> variable is created its divided by 1000 which effectively converts the time
> units from femto seconds to pico. Change this according to your needs. On
> the final graph the horizontal axis has the label time (?). Replace the "?"
> with whatever you end up using.
>
> Disclaimer:
>
> I spent 15-20 minutes doing this and about the whole of 3 minutes testing.
> So there are no assurance of anything. Use at your own risk.
> Theoretically we are just manipulating the way things are drawn on a
> canvas which has nothing to do with anything else (Hopefully!!) ... so be
> careful.
>
>
> On Fri, Aug 18, 2017 at 2:32 AM, Chitrak Gupta <chgupta_at_mix.wvu.edu>
> wrote:
>
>> Hi Ashar,
>>
>> Do you know of any way to get the Timeline plugin to display the time
>> instead of the frames? I guess that's what the point of the post is. I
>> don't use Timeline too much, but I do remember trying (and failing) to get
>> the Timeline plugin to do the conversion.
>>
>> On Thu, Aug 17, 2017 at 10:27 AM, Ashar Malik <asharjm_at_gmail.com> wrote:
>>
>>> Please refer to my earlier message to work out the necessary details.
>>> Once you have your answer, which would be in femto seconds convert that
>>> into nano seconds.
>>> You should be able to do this conversion.
>>>
>>> On Fri, Aug 18, 2017 at 2:15 AM, Chitrak Gupta <chgupta_at_mix.wvu.edu>
>>> wrote:
>>>
>>>> Let me guess. Is your problem about the output of the Timeline plugin?
>>>> If that is the case, you should have mentioned this because people in the
>>>> forum are not being able to understand your concern. If not, then you would
>>>> need to go back to the basics of MD simulation.
>>>>
>>>> On Thu, Aug 17, 2017 at 8:58 AM, Ashar Malik <asharjm_at_gmail.com> wrote:
>>>>
>>>>> Seriously?
>>>>> Do you know how to convert femto seconds to nano seconds?????
>>>>>
>>>>> On Aug 18, 2017 12:27 AM, "Saikat Pal" <saikatpaliitg_at_yahoo.com>
>>>>> wrote:
>>>>>
>>>>>> Thank you sir for your kind response.But I want to know how to
>>>>>> convert frames to nano second in secondary structure analysis result.I have
>>>>>> attached the file.
>>>>>>
>>>>>>
>>>>>> Thank you
>>>>>> Saikat
>>>>>> On Wednesday 16 August 2017, 9:58:57 PM IST, Ashar Malik <
>>>>>> asharjm_at_gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>> To the person who asked this:::
>>>>>>
>>>>>> Dear all,
>>>>>> I have performed secondary structure analysis using VMD. I have get
>>>>>> the result. I want to convert frames to nano seconds.What should I do ??
>>>>>> Please help me.
>>>>>> Thanks and regards,
>>>>>> Saikat
>>>>>>
>>>>>> You will need to look at the configuration file you used to run the
>>>>>> simulation. If you used NAMD you will have to look for something like
>>>>>>
>>>>>> the time step you used, a common value is 2fs - yours may be
>>>>>> different so look for it.
>>>>>> the total number of steps you simulated for (N)
>>>>>> the freq with which you saved frames to your trajectory (m)
>>>>>>
>>>>>> The way it works is that -
>>>>>>
>>>>>> if you run the simulation for N steps, with each step 2fs apart, you
>>>>>> will basically have a total time of 2N femto seconds.
>>>>>> but you were saving your frames to the trajectory every m-th step.
>>>>>>
>>>>>> if each step is 2fs then every consecutive frame would be 2m femto
>>>>>> seconds apart.
>>>>>>
>>>>>> to double check this -- this relation should hold.
>>>>>>
>>>>>> Number of Frames (nF) = (N x 2fs) / m
>>>>>>
>>>>>> to convert between frames and time just solve
>>>>>>
>>>>>> 2fs x (frame number) x m
>>>>>>
>>>>>> the answer to the above will be time. This time value you will
>>>>>> substitute for the frame number on the x-axis of the graph that you are
>>>>>> (probably!!!) trying to make.
>>>>>>
>>>>>> Instead of just calculating the final number its good to at least
>>>>>> once the simulation is done to do a sort of quick sanity check to make sure
>>>>>> everything is in order by making sure you have the right number of frames
>>>>>> in the trajectory.
>>>>>>
>>>>>> Hope this helps.
>>>>>>
>>>>>> On Thu, Aug 17, 2017 at 1:31 AM, Saikat Pal <
>>>>>> saikatpaliitg_at_remove_yahoo.com> wrote:
>>>>>>
>>>>>> Dear all,
>>>>>> I have performed secondary structure analysis using VMD. I have get
>>>>>> the result. I want to convert frames to nano seconds.What should I do ??
>>>>>> Please help me.
>>>>>> Thanks and regards,
>>>>>> Saikat
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best,
>>>>>> /A
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Best,
>>> /A
>>>
>>
>>
>
>
> --
> Best,
> /A
>