next up previous contents
Next: Acknowledgements Up: Timeline Tutorial Previous: Trajectory analysis: titin domain   Contents

Subsections


Analysis Scripts

Simple user-defined all-residue scripts

The Calculate $\rightarrow$ Calc. User Defined (Per.-Res.) command allows you to call the name of a user-defined tcl procedure which will be run on every residue. Name the function in Analysis $\rightarrow$ Define every residue function; prepend ``::'' to indicate the global namespace. The named Tcl procedure will be provided with three VMD selections to work with: resCompleteSel (the current residue or selection group), resAtomSel (a single atom for each protein or nucleic residue), and proteinNucSel ("protein or nucleic" VMD selection for the whole molecule).

Example 1:

Type into the VMD Tk console:

proc ::myResX {resAtomSel  resCompleteSel  proteinNucSel} {
    return [$resAtomSel get x]
}
Example 2: Type into the VMD Tk console:
proc  ::myCountContacts {resAtomSel  resCompleteSel  proteinNucSel} {
    return [llength [lindex [measure contacts 4.0 $resCompleteSel \
             $proteinNucSel ] 0]]
}

The above files can be sourced from the VMD Tk Console:
cd timeline-tutorial-files, cd examples,then source myResX.tcl
and
source myCountContacts.tcl .
The functions will remain available for the rest of the VMD session; .

Writing a .tcl script to generate a per-residue .tml data file

The Timeline plugin can save data to .tml files, which provide per-residue or per-selection data for a given molecule and trajectory. This subsection shows how to generate a per-residue .tml file using Tcl code. These can be generated in a non-interactive VMD session, running on one or more processors, to enable long calculation jobs.

Use your text editor to create a tcl file in the the timeline-tutorial-files to contain the data calculation script. Name it: titin-per-res-rmsd.tcl. We'll include some simple commands, and two tcl procedures: the user-specfied analysis myRmsdBatchCalc, and the plugin-provided ::timeline::writeDataFileHeader

See sample scripts, including the completed version of titin-per-res-rmsd.tcl, in the examples directory, which is in the timeline-tutorial-files directory.

Figure 12: Protein contacts count, per beta strand, for titin I91 domain, over all frames of the loaded trajectory. When selected in the 2D view (left panel), the whole strand is highlighted in the 3D view. (right panel). The values in the 2D view are the total protein contacts for all the residues in each strand.
\includegraphics[width=5.5in]{FIGS/tl-strand-contacts}


Writing a .tcl script to generate a per-selection .tml data file

This subsection shows how to generate a per-selection .tml file using Tcl code. These can be generated in a non-interactive VMD session, running on one or more processors, to enable long calculation jobs.

See a per-selection plot in Figure 12. Note that the selection of a single element in the 2D plot selects a large selection of the molecule; here all the residues in beta-strand B.


next up previous contents
Next: Acknowledgements Up: Timeline Tutorial Previous: Trajectory analysis: titin domain   Contents
school@ks.uiuc.edu