Re: [PyMOL] pymol to webGL?

2015-10-19 Thread Albert
Dear Osvaldo: Thanks a lot for further information. I just run the command |set pse_export_version, 1.72 | before I load anything to pymol, then followed the step for exporting. But it still failed with messages: Traceback (most recent call last): File

Re: [PyMOL] pymol to webGL?

2015-10-18 Thread Takanori Nakane
Hi, It looks like the structure of PyMOL session (what we got from cmd.get_session) has changed in recent upgrades. I have to rewrite the program. Does anyone know if there is a setting to export in the 'old' format? Best regards, Takanori Nakane On 2015/10/18 1:47, Osvaldo Martin wrote: >

Re: [PyMOL] pymol to webGL?

2015-10-18 Thread David Hall
You can set: pse_export_version to the 3-part version of pymol you would like to use as an export version. -David > On Oct 18, 2015, at 3:48 AM, Takanori Nakane > wrote: > > Hi, > > It looks like the structure of PyMOL session (what > we got from

Re: [PyMOL] pymol to webGL?

2015-10-18 Thread Osvaldo Martin
Hi Takanori, Thanks for joining the conversation. I have been talking with Albert (off-list) and as you wrote the problem seems to be related with the way PyMOL save the session in the newer versions. To export a pse file to an older PyMOl version you should do: set pse_export_version, 1.72

Re: [PyMOL] pymol to webGL?

2015-10-17 Thread Osvaldo Martin
That really weird! the script is expecting a list but is getting an integer. Could you send me the "my" molecule or a pse file with that molecule? or at least other molecule that give you the same error? Cheers, Osvaldo. On Sat, Oct 17, 2015 at 5:49 PM, Albert wrote: >

[PyMOL] pymol to webGL?

2015-10-17 Thread Albert
Hello: I noticed that there is a plugin called exportToWeb.py I try to rum it with command: python exportToWeb.py test.pse However, no any new file generated I am just wondering how shall we use this script correctly? thanks a lot Albert

Re: [PyMOL] pymol to webGL?

2015-10-17 Thread Osvaldo Martin
Hi Albert, I get the following error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pymol/parser.py", line 254, in parse self.result=apply(layer.kw[0],layer.args,layer.kw_args) File "exportToWeb.py", line 138, in dump_rep int(255 * float(bgcolor[1])),

Re: [PyMOL] pymol to webGL?

2015-10-17 Thread Osvaldo Martin
Hi Albert, I change the code to bgcolor = cmd.get_color_tuple(cmd.get_setting_tuple('bg_rgb')[1][0]) ret += "\nbgcolor:%02x%02x%02x" % (int(255 * float(bgcolor[0])), \ int(255 * float(bgcolor[1])), int(255 * float(bgcolor[2]))) I think the code is correct, anyway when I export the

Re: [PyMOL] pymol to webGL?

2015-10-17 Thread Osvaldo Martin
Hi Albert, I do the following steps and I get a .html file as expected. 1. I download and unpack this file. The script there seems to be similar to the one you attached. 2. Lauch PyMOL and do some

Re: [PyMOL] pymol to webGL?

2015-10-17 Thread Albert
Thanks a lot for further advice. Here is what I got: PyMOL> run exportToWeb.py PyMOL>exportToWeb my Traceback (most recent call last): File "/home/albert/install/pymol-1.7.6/modules/pymol/parser.py", line 256, in parse self.result=apply(layer.kw[0],layer.args,layer.kw_args) File