From: sunyeping (sunyeping_at_aliyun.com)
Date: Mon Aug 22 2016 - 09:12:01 CDT

According to the DESCRIPTION of morph.tcl, it only generates interpolation between two frames. But is it possible to write a script to generate interpolation between every two frame and then combine all original frames and the newly generate interpolating frame into one new trajectory if the trajectory contains thousands of frames? Even this can be done, wouldn't the size of the smoothed movie be very large?
And morph.tcl seems to generate interpolation for the coordination. In order to applying to the label, some modify may needed. 
Hoping someone who are interested may make up such a script.
Best regards.
Yeping Sun
------------------------------------------------------------------From:Norman Geist <norman.geist_at_uni-greifswald.de>Time:2016 Aug 22 (Mon) 21:42To:孙业平 <sunyeping_at_aliyun.com>Cc:vmd-l <vmd-l_at_ks.uiuc.edu>Subject:AW: AW: AW: vmd-l: How to smooth atom labels in a MD trajectory?
Forget what I said. As you use the smoothing option from the representations, this will not work. Also will it not work well with the MovieMaker at all. A better option would be to actually introduce the smoothing into your frames. Easiest by adapting the morph.tcl script from the VMD script library to interpolate frames between all existing frames. This will allow to actually use VMD’s movie maker, and will actually also smooth the labels. Good luck Norman Geist Von: sunyeping [mailto:sunyeping_at_aliyun.com]
Gesendet: Montag, 22. August 2016 15:12
An: Norman Geist <norman.geist_at_uni-greifswald.de>
Betreff: Re: AW: AW: vmd-l: How to smooth atom labels in a MD trajectory? Sorry, the link for test2 is: https://www.dropbox.com/s/zhlhmf0gyfo8hs4/test2.mpg?dl=0 Placing the label to a fixed position may not be suitable for my situation. In the movie I am really working on, large displacement occurs to the residues I need to label, so the average position may be far way from the actual position of the residue in most frames. Besides, there are quite a few residues that need to be labelled. Thus, fixing the label position may cause confusion. So an ideal effect would be that the label move along with the residue. Yeping Sun ------------------------------------------------------------------From:Norman Geist <norman.geist_at_uni-greifswald.de>Time:2016 Aug 22 (Mon) 20:50To:孙业平 <sunyeping_at_aliyun.com>Subject:AW: AW: vmd-l: How to smooth atom labels in a MD trajectory? Unfortunately u seem to have sent the same link twice, so I still couldn’t see the „unwanted“ behavior.But anyway, I would suggest, as the labeled residues don’t move around much, that you could compute the average position of the center of mass of the labeled residues. Then add an offset to place the labels to a fixed position beside the residues, so they don’t move at all. If this isn’t a suitable solution in your case, please send the correct link for you test2 example. Norman Geist Von: sunyeping [mailto:sunyeping_at_aliyun.com]
Gesendet: Montag, 22. August 2016 14:17
An: Norman Geist <norman.geist_at_uni-greifswald.de>
Cc: vmd-l <vmd-l_at_ks.uiuc.edu>
Betreff: Re: AW: vmd-l: How to smooth atom labels in a MD trajectory? Dear Prof. Geist, Please see the two example movies (test1.mpg and test1.mpg): https://www.dropbox.com/s/0i35bafuub1tpbo/test1.mpg?dl=0https://www.dropbox.com/s/0i35bafuub1tpbo/test1.mpg?dl=0 I am trying to add label text to the residues (HIS3 and TYR7). In the test1, the "Trajectory Smoothing Window Size" for all representations (one cartoon for the sheet structure and two sticks for the two residues" are set to 0, so you can see that the label texts (HIS3 and TYR7) move synchronically with the two stick representations for the two residues and they always attach to the residue stick representations, but all of them move too fast and the movement is not smooth.  However, in the test2,  the "Trajectory Smoothing Window Size" for all representations are set to 40, so the movement of these representations are smooth and slow. Please notice that the label texts lose the synchronism, they appear to flap rapidly and often detach from the residue sticks. I wish the synchronism between label texts and the structure representations can be recovered. So I guess if there is also a "label text smoothing" function in VMD, the problem can be solved. But is there? Best regards. Yeping Sun------------------------------------------------------------------From:Norman Geist <norman.geist_at_uni-greifswald.de>Time:2016 Aug 22 (Mon) 14:04To:孙业平 <sunyeping_at_aliyun.com>Cc:vmd-l <vmd-l_at_ks.uiuc.edu>Subject:AW: vmd-l: How to smooth atom labels in a MD trajectory? Do you mean you would have to smoothly let the labels “fly” from one to the other position? Can you show us an example of the current behavior? Von: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] Im Auftrag von ???
Gesendet: Samstag, 20. August 2016 20:07
An: vmd-l <vmd-l_at_ks.uiuc.edu>
Betreff: vmd-l: How to smooth atom labels in a MD trajectory? Dear all,  I am making a movie for a MD trajectory in which I want to show the simulation time and simutaneously label several residues. For this purpose I Use the follow script: proc enabletrace {} {  
  global vmd_frame;  
  trace variable vmd_frame([molinfo top]) w drawcounter  
}  
proc disabletrace {} {  
  global vmd_frame;  
  trace vdelete vmd_frame([molinfo top]) w drawcounter  
}  
proc drawcounter { name element op } {  
  global vmd_frame;  
  draw delete all  
  # puts "callback!"  
  draw color red  
  set nsperframe 0.02  
  set nsoffset 20
  set time [format "%4.2f ns" [expr ($vmd_frame([molinfo top]) * $nsperframe) + $nsoffset]]
  draw text {40 40 32} "$time"

  set sel1 [atomselect top "segname P1 and resid 63 and name CA"]
  lassign [$sel1 get {x y z}] coord1
  draw text $coord1 "GLU63"

  draw color blue
  set sel2 [atomselect top "segname P1 and resid 66 and name CA"]
  lassign [$sel2 get {x y z}] coord2
  draw text $coord2 "LYS66"

  draw color green
  set sel3 [atomselect top "segname P3 and resid 2 and name CA"]
  lassign [$sel3 get {x y z}] coord3
  draw text $coord3 "ALA2"
 
  set sel4 [atomselect top "segname P3 and resid 3 and name CA"]
  lassign [$sel4 get {x y z}] coord4
  draw text $coord4 "VAL3"
} This is no problem for the "time" showing. However, the atom labels flap rapidly and can not be visualized clearly. Because I have set the "Trajectory Smoothing Window Size" to 30, I think if I can not do a similar smoothing setting to these atom labels, I can get a satisfying effect. But I don't know how. Could anyone give me some help about this? Thank you in advance!   Yeping Sun