There is one other convenient format:  ".pkl", that works like PDB, but
is a Pickled copy of the PyMOL Model Class.  The main advantage this has
over .pdb is that it saves and restores extra properties such as
secondary structure code, atom types, van der waals radii, formal and
partial charges, etc.  

load myprot.pdb
dss
show cartoon
alter 100-110/, ss='H'
alter 65-67,ss='L'
save myprot.pkl

... quit program, complete your PhD, take a vacation, and come back...

load myprot.pkl
show cartoon

will work.

".pkl" has the additional advantage of being a simple molecular object
useful in straight Python, outside of PyMOL.  All you need to do is have
a copy of PyMOL's "chempy" module available in your PYTHONPATH

from chempy import io

model = io.pkl.fromFile("myprot.pkl")
for atom in model.atom:
   print atom.name
   
Cheers,
Warren


--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net 
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
> Igor Pechersky
> Sent: Friday, November 14, 2003 3:07 AM
> To: andr...@biochem.utah.edu; Andreas Foerster
> Cc: pymol
> Subject: Re: [PyMOL] dss & ribbon representation
> 
> 
>  Andreas Foerster <andr...@biochem.utah.edu>:
> 
> > - The dss algorithm is great, a very quick way to assign secondary 
> > structure. Is there a way of conserving the information when saving 
> > the pdb?
> There are at least 3 ways to store SS assignments from PyMOL. 
> Depends on your needs:
> 
> 1. Save PyMOL session (*.pse). Atom properties, including 
> "ss", will be restorable by 
> PyMOL.
> 
> 2. Print SS in "PHD-like" format. So, assuming that unfamous 
> 1tii.pdb is loaded
> PyMOL>import pymol
> PyMOL>stored.ss = []
> PyMOL>iterate 1tii//a//ca, stored.ss.append(string.ljust(ss,1))
> PyMOL>print string.join(stored.ss,"")
> 
> will print single string like 
> LSSSSSSLLLHHHHHHHLLLLLLLLLLLLLLLLLLLLLHHHHHHLLLLLLLLLLLSSSSSLL
> HHHHHHHHHHHHLLLLSSSSSSSSLLL
> LSSSHHHHHLLLLLLHHHLLSSSSLLLLHHHLSSSSSSSLLLLLLLLLLLLLLLHHHHLLLL
> LLLHHHHHHHLLLLLLLHHHHLLHHHH
> HLLHHHLL
> 
> 3. Wait for Warren to vivify cSetting_save_pdb_ss :)
> 
> 
> > Sometimes it's nice to edit the assignment.
> I haven't understood your question. You might edit dss 
> assignment just by
> PyMOL>alter pk1, ss='S'
> 
> Is it sufficient? 
> 
> -igor
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest 
> developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, 
> and more! http://www.apachecon.com/ 
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 


Reply via email to