VMD-L Mailing List
From: Jawahar Neelankatan (neelankatan_j_at_yahoo.com)
Date: Fri Oct 20 2006 - 19:05:49 CDT
- Next message: Jeffrey A Tibbitt: "Starting VMD at Command Line in OSX"
- Previous message: Axel Kohlmeyer: "Re: adding selections"
- In reply to: Axel Kohlmeyer: "Re: CPK Graphical Representation"
- Next in thread: Alexandr Isayev: "Re: CPK Graphical Representation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Axel,
Thanks a lot ! It worked. I also made some modification to the vmd.rc code so that it can display simple molecules (with no secondary structure, i.e.no alpha helices or beta sheets) in CPK format and display complex molecules (with secondary structure) in NewCartoon format. For anyone interested, it is :
after idle {
foreach mid [molinfo list] {
mol delrep 0 $mid
set a [atomselect $mid {alpha or sheet}]
set b [$a num]
$a delete
if {$b} {
mol representation newcartoon
mol addrep $mid
} else {
mol representation CPK
mol addrep $mid
}
}
}
-Jawahar
Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu> wrote: 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 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. --------------------------------- Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
- Next message: Jeffrey A Tibbitt: "Starting VMD at Command Line in OSX"
- Previous message: Axel Kohlmeyer: "Re: adding selections"
- In reply to: Axel Kohlmeyer: "Re: CPK Graphical Representation"
- Next in thread: Alexandr Isayev: "Re: CPK Graphical Representation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]