((short description what this page is about))

enable live update of secondary structure assigment

When selecting the Catoon or NewCartoon representation, the secondary structure elements are drawn such that they represent the structure in the pdb file (first frame). When the secondary structure changes in a trajectory, it is convenient to redraw the secondary structure elements such that they represent the secondary structure of the current frame. To enable this behaviour add the following lines to the VMD statup file ~/.vmdrc
proc update_secondary_structure_assigment { args } {
  foreach molid [molinfo list] {
    mol ssrecalc $molid
trace variable vmd_frame(0) w update_secondary_structure_assigment

adding keyboard shortcuts

E.g. change graphical representation of top molecule to NewCartoon, when F1 is pressed.
user add key F1 { mol modstyle 0 0 NewCartoon }

creating multiple graphical representations of same molecule in script

mol modselect 0 top "protein"
mol modstyle 0 top NewCartoon
mol modcolor 0 top Chain

# add a second representation
mol addrep top
mol modselect 1 top "water"
mol modstyle 1 top Licorice
mol modcolor 1 top ColorID 1 



This topic: CompMolBio > Resources > KnowledgeBase > VMDTricks
Topic revision: 02 Feb 2016, FabianPaul