Currently in my VMD display, I define the Trajectory Smoothing Window Size in the dialog box as below.

Figure below is for protein selection, the Trajectory Smoothing Window Size as 5.

enter image description here

How can I encode that to Tcl script?

The current Tcl script I have is this (vmd.tcl):

display projection Orthographic
display rendermode GLSL
mol modselect 0 0 protein
mol modstyle 0 0 NewCartoon 0.300000 10.000000 4.100000 0
mol modcolor 0 0 Structure
mol addrep 0
mol modselect 1 0 resname PEP
mol modstyle 1 0 Licorice 0.300000 12.000000 12.000000
mol modcolor 1 0 Name

And I'd like to incorporate the Trajectory Smoothing Window Size into it, for both protein and resname PEP.

Later I execute it as:

$ vmd md.gro md_noPBC.xtc -e vmd.tcl

1 Answer 1


You could use mol smoothrep x y z


  1. x is the molid
  2. y is the representation number (starts from 0)
  3. z is the trajectory smoothining window size

In your case, for molid 0 and for protein representation and trajectory smoothing window size of 5, the command will be

mol smoothrep 0 0 5

and for representation of resname PEP, the command will be

mol smoothrep 0 1 5

  • $\begingroup$ does the y value follow the order on the Graphical Representation display? $\endgroup$ Dec 30, 2021 at 7:22
  • 2
    $\begingroup$ @scamander yes. Mind, it doesn’t start from 1, instead it starts from 0 $\endgroup$
    – Vasista
    Dec 30, 2021 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .