Rob,

        There isn't a public API function which does this at present but
the private _cmd.get_pdb call does exactly that.  To see an example of
how it is used, look at the "save" function in
modules/pymol/exporting.py.  I'll add a cmd.get_pdbstr() function to the
next version of PyMOL, since _cmd isn't meant to be called by anyone
except PyMOL.

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 Robert Campbell
> Sent: Thursday, September 11, 2003 7:07 AM
> To: pymol-users@lists.sourceforge.net
> Subject: Re: [PyMOL] alternative method for loading coordinates
> 
> Warren,
> 
> * Warren L. DeLano <war...@delanoscientific.com> [2003-09-09 17:42]
wrote:
> >
> >     If you're willing to switch into Python, there is an
> > undocumented "read_pdbstr" function which can take a PDB file as a
> > string variable.  See modules/pymol/importing.py for the code.
> > Temporary files are unnecessary.
> 
> This could be very handy, but is there a way to write a pdb string
from
> within PyMOL? I've found export_coords, but that creates a PyCObject
> and I'm not sure how that can be used. I suppose it needn't be PDB
> format, but something that could be used (or converted for use) by
other
> programs or user-written routines.
> 
> Cheers,
> Rob
> --
> Robert L. Campbell, Ph.D.
<r...@post.queensu.ca>
> Senior Research Associate                            phone:
613-533-6821
> Dept. of Biochemistry, Queen's University,             fax:
613-533-2497
> Kingston, ON K7L 3N6  Canada
http://adelie.biochem.queensu.ca/~rlc
>     PGP Fingerprint: 9B49 3D3F A489 05DC B35C  8E33 F238 A8F5 F635
C0E2


Reply via email to