RE: tcl question

From: Blake Charlebois (
Date: Thu Jun 16 2005 - 21:15:59 CDT

The mkrep procedure below is not quite as efficient and general as it could
be, but it has worked well for me. By typing "logfile console" in tkcon, you
can have vmd record tcl commands for your subsequent actions. This is
quicker than using the manual, though it is not always perfectly clear what
is going on. You can use this to get the render command you are looking for.

proc mkrep {stxt coltxt reptxt {molid top}} {
        set rn [molinfo $molid get numreps]
        mol addrep $molid
        mol modcolor $rn $molid $coltxt
        mol modselect $rn $molid $stxt
        mol modstyle $rn $molid $reptxt
mol showrep top [expr [molinfo top get numreps]-1] 0
mkrep "protein" "Structure" "Cartoon 2.1 12.0 3.0"

-----Original Message-----
From: [] On Behalf
Of Samuel Flores
Sent: June 16, 2005 9:03 PM
To: 'Samuel Flores'; 'Luis Rosales';
Subject: namd-l: tcl question

I wonder if anyone can help me...

I am trying to use VMD for a simple purpose. I want to have my server take
a pdb file, read it into VMD, display it using the Cartoon style, color by
Structure, and then save the resulting graphic to a file. I want to write a
script to do this. Is there a good reference? I can read in the file but
don't know how to tell it to display in Cartoon style.

Many thanks


This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:40:51 CST