Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-09 Thread Thomas Holder
it's on the wiki now: http://pymolwiki.org/index.php/Pml2py Cheers, Thomas Thomas Holder wrote, On 04/09/11 11:17: > Michael Lerner wrote, On 04/08/11 20:16: >> 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 e

Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-09 Thread Thomas Holder
Michael Lerner wrote, On 04/08/11 20:16: 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. mostly-working script attached,

Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-09 Thread Thomas Holder
Jason Vertrees wrote, On 04/08/11 20:09: > 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) I would use the cmd.keywo

Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-08 Thread Michael Lerner
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.vert

Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-08 Thread Jason Vertrees
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