From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Oct 20 2006 - 11:48:23 CDT

On Fri, 20 Oct 2006, Jawahar Neelankatan wrote:

JN> Hi Axel,

JN> Thanks for the reply. When I change the vmd.rc file, the
JN> modifications work when I first start VMD then load the PDB file.
JN> The molecule is correctly displayed in CPK form.

JN> But if I start VMD the other way, i.e. the PDB file is clicked on
JN> in Windows and VMD starts up, the molecule is still displayed in
JN> line representation.

ah. right.

the contents of .vmdrc are processed long after vmd starts trying
to read molecules passed on the command line. you can try to delete
the old and add a new representation by adding the following at
the end of your .vmdrc (or vmd.rc).

after idle {
# change default rep for already loaded molecules
  mol representation CPK
  foreach mid [molinfo list] {
    mol delrep 0 $mid
    mol addrep $mid
  }
}

cheers,
   axel.

JN>
JN> Thanks,
JN> Jawahar
JN>
JN> Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu> wrote: On Fri, 20 Oct 2006, Jawahar Neelankatan wrote:
JN>
JN> JN> Hi all,
JN>
JN> JN> When I click on PDB files in my computer, they open in VMD. They are
JN> JN> displayed using the default 'line' graphic representation. I'd like
JN> JN> them to display in the CPK (ball and stick) graphic representation
JN> JN> by default. Is there any way to set this as the default so that when
JN> JN> VMD opens, the PDB file is automatically displayed in CPK
JN> JN> representation and not 'line' representation ?
JN>
JN> yes. check out the 'mol default' command. it has been
JN> discussed on the mailing list a number of times. see e.g.:
JN> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/7085.html
JN>
JN> axel.
JN>
JN> JN>
JN> JN> Thanks,
JN> JN> Jawahar
JN> JN>
JN> JN>
JN> JN> ---------------------------------
JN> JN> Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
JN>
JN>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   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.