I am using VMD to visualise the secondary structure of protein.

The trajectories are from my Gromacs simulation. Firstly I use File - New Molecule... to load the protein.gro file. Secondly I use File - Load Data into Molecule... to load my protein.xtc trajectories.

Then I use Cartoon to visulise the structure. As I drag the time frames, all the secondary structures (e.g. alpha-helix, beta-sheet) keep the same. But I am pretty sure some of them are changing, as I look into the Timeline analysis for secondary structure.

So how to use VMD to see the secondary structures at different time frames?

Thanks a lot for @Stefan's help! It finally works! So follow Stefan's guide, and replace the molid with the number under the ID in the VMD Main.

  • $\begingroup$ I see this was asked first on bioinformatics.SE: bioinformatics.stackexchange.com/questions/3432 $\endgroup$
    – marcin
    Jan 30 '18 at 13:11
  • $\begingroup$ yes, because no one answer it. $\endgroup$
    – lanselibai
    Jan 30 '18 at 13:57
  • $\begingroup$ And could you please tell me, where is rule that I cannot ask a repeated question in two sites? @marcin $\endgroup$
    – lanselibai
    Jan 30 '18 at 14:15
  • $\begingroup$ @lanselibai it is all over the place, check this answer by the cofounder of SE for instance. And it's not a rule per se, but its generally preferred that you tailor your questions to the audience of the site you're posting on. $\endgroup$
    – rotaredom
    Jan 30 '18 at 14:25
  • $\begingroup$ I understand the necessity to ask only in one place. But because there is not a clear boundary line regarding my VMD software issue, I feel it can fit both sites. So, it would be better if there is an explicit definition of where my question should be posted. $\endgroup$
    – lanselibai
    Jan 30 '18 at 17:44

As Martin pointed out, VMD doesn't update secondary structure content over the course of an MD trajectory. You can easily do this in VMD by using the SSCache script:


I believe it ships with the newest versions of VMD, actually, but I'm not exactly sure; even if not, you can easily source it:

Extensions > Tk console (in the console, type source Downloads/sscache.tcl (or where ever you've saved the script)). Once you've sourced the script, the easiest thing to do would be to load your topology and trajectory and (in the Tk console) issue the command start_sscache molid, although I advise having a look at the examples and options in the script.

  • $\begingroup$ thank you very much. Both source Downloads/sscache.tcl and start_sscache molid could use. However, as I move along the time frame, I could not see any secondary structure (SS) change. I was using Extensions - Analysis - Timeline- Calculate - Calc. Sec. Struct. to visualise the SS, so I know the SS is definitely changing. So I wonder if the sscache is adopting the same algorithm as Timeline (which is STRIDE) for SS? $\endgroup$
    – lanselibai
    Feb 1 '18 at 11:56
  • $\begingroup$ 'molid' in this example is just a substitute for your system's ID; you can see it under ID next to the number of atoms in the VMD main window. If your system is called 'myMolecules,' you issue start_sscache myMolecules in the Tk console (you have to issue source Downloads/sscache.tcl, of course) $\endgroup$
    – Stefan
    Feb 1 '18 at 14:20

Animating the secondary structure in VMD

The secondary structure definitions for the molecules in VMD don't change during an animation but they can be made to do so with a trace on the vmd_frame($molecule) Tcl variable. The simplest way is to call vmd_calculate_structure(molecule) every time the frame changes . . .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.