
Once an ' else if' succeeds, none of the remaining else if's or else's will be tested. On VMD TK console use the following commands set all atomselect top 'protein' set all atomselect top 'protein and res id 1-20' Cite Top contributors to discussions in this field Nidhal. show sequence menu show tkcon Tcl console (Works after the first use of Extensions -> tkcon). When using if, else if, else statements there are few points to keep in mind −Īn ' if' can have zero or one else's and it must come after any else if's.Īn ' if' can have zero to many else if's and they must come before the else. The commands here are executed as soon as VMD starts up.
VMD TK CONSOLE COMMANDS CODE
When the above code is compiled and executed, it produces the following result −Īn ' if' statement can be followed by an optional else if.else statement, which is very useful to test various conditions using single if.else if statement. Extensions > Tk console (in the console, type source Downloads/sscache.tcl (or where ever youve saved the script)). #if condition is false then print the following ' to navigate and 'pwd' to show current directory) Type 'source ott-count.txt' to execute the script and the data will be saved as 'countout.txt'.

These commands are entered as text commands on the Tcl command line.

#if condition is true then print the following On VMD TK console use the following commands set all atomselect top 'protein' set all atomselect top 'protein and res id 1-20' Cite Asked 21st Jul, 2014 Sangita Kachhap vmd rmsd align. Open VMD TkConsole (click Extension tab then Tk Console) Set directory to the location of script file (Use command 'cd' and 'cd. Advanced: setting labels with Tcl commands¶ VMD comes with a full-blown scripting language, namely Tcl with VMD-specific extensions (which are described in the VMD Users Guide). All Tcl commands in VMD are composed of one or more words or phrases separated by white space, and terminated by a newline.
