It's not elegant at all, but it's worth knowing that you can use
cmd.do("...") as a quick fix for lines that aren't immediately easy to
convert.

Even a mostly-working pml2py tool would be a useful addition to the wiki.

Cheers,

-Michael

On Fri, Apr 8, 2011 at 2:09 PM, Jason Vertrees <
jason.vertr...@schrodinger.com> wrote:

> Hi Matthias,
>
> There is no script that I'm aware of, but writing one should be rather
> straightforward because of how the API is organized:
>
> commandName arg1, arg2, arg3
>
> becomes
>
> cmd.commandName(arg1, arg2, arg3)
>
> The hardest part would be determining when to quote strings versus not
> quoting numbers and variables.  You might be able to reflect against
> the API for a more robust script
> (http://diveintopython.org/power_of_introspection/index.html).  Java's
> great at that, not sure about Python.  Good luck.
>
> Cheers,
>
> -- Jason
>
>
> On Fri, Apr 8, 2011 at 1:01 PM, Matthias Schmidt
> <matthias.rene.schm...@gmail.com> wrote:
> > Hi,
> >
> > I have a few pml scripts for pymol that I would like to rewrite
> > properly in python, making use of Pymol's ability to interprete Python
> > scripts.
> >
> > Do you know of an interpreter that converts pml scripts automatically
> > to python scripts for Pymol? Since the number of tasks that you can do
> > in pml is finite, this should be possible, or not?
> >
> > Best,
> >
> > Matthias
> >
> > --
> > Structural Bioinformatics and Computational Biochemistry Unit
> > Dept. of Biochemistry
> > University of Oxford
> > South Parks Road
> > Oxford
> > OX1 3QU
> > U.K.
> >
> > Telephone: 01865 613304
> > Fax: 01865 613238
> >
> >
> ------------------------------------------------------------------------------
> > Xperia(TM) PLAY
> > It's a major breakthrough. An authentic gaming
> > smartphone on the nation's most reliable network.
> > And it wants your games.
> > http://p.sf.net/sfu/verizon-sfdev
> > _______________________________________________
> > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> >
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to