Hi Osvaldo,

Sorry for the delay. Mobile PyMOL development is taking up most of my time now.

There is no easy way. You'd need to wrap the save function. It would
look something like (warning untested code follows):

def my_save(file,object,header):

  # make sure there's a newline after the header

  suff = "" if header[-1]=='\n' else '\n'

  f = open(file, 'wb')

  # write the header

  f.write(header+suff)

  # write the PDB

  f.write(cmd.get_pdbstr(object))

  f.close()


You would then call this as:

my_save myFile.pdb, myObject, myHeader.

Cheers,

-- Jason

On Thu, Apr 5, 2012 at 1:33 PM, Osvaldo Martin <[email protected]> wrote:
> Hi,
>
> There is an easy way to save a pdb adding custom headers using PyMol?
>
> Thanks.
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> PyMOL-users mailing list ([email protected])
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/[email protected]



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrödinger, LLC

(e) [email protected]
(o) +1 (603) 374-7120

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to