From: Axel Kohlmeyer (
Date: Wed Jan 25 2006 - 06:53:15 CST

On Wed, 25 Jan 2006, Adrian Koh wrote:

AK> Hi,


AK> How could I change the default graphical representations in vmd.rc
AK> file? What is the script to change the default "Coloring Method" and
AK> "Drawing Method" under the "Draw Style" menu?

due to some technical reasons, this is currently not directly possible,
see the following URL for a workaround.

AK> I found in the manual, pg. 105, that a probable command would be "mol
AK> color /coloring_method/", I've filled in "Element" for the
AK> "coloring_method" but nothing happened. How do we know what to fill in
AK> place of the italicized commands shown in the manual?

it is not that simple. this command will set the default for the
next new representation, but the first representation is hardcoded
into VMD. to change the color of an existing representation, you
need to use 'mol modcolor...' and 'mol modstyle ...' and so on.

i suggest you create a visualization and then save the state and look
at the generated file. search for 'mol new' and this is where the
loading of a molecule and creation of a representation happens on
the script level. you will see, that it first deletes the default.

another way to deal with that issue (because there are potential
performance problems on huge molecules with other reps than lines)
is to have a minimal 'template' script file to load a molecule in
the style you want it (e.g. created from a saved state file by deleting
everything unwanted) and then just change the filename and load that
state/script file instead of the molecule.


AK> Thanks!
AK> Regards,
AK> Adrian.

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.