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:

> 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 "exportToWeb.py", line 118, in dump_rep
> ret += parseObjMol(obj)
>   File "exportToWeb.py", line 50, in parseObjMol
> if (rep[5] == 1):
> TypeError: 'int' object has no attribute '__getitem__'
>
>
> If possible, would you please give me some suggestions?
>
> Thanks a lot
>
> Albert
>
>
>
>
> On 10/17/2015 04:36 PM, Osvaldo Martin wrote:
>
> 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 stuff
>3. cd to the folder creating during unpacking
>4. run the script by doing
>
> run exportToWeb.py
>
>5. then run the commnand
>
> exportToWeb PymolObjectName
>
>where PymolObjectName is the name of the pymol object you want to
>export
>6. check the unpacked folder for a file with the name
>PymolObjectName.html
>
> Could you try to follow these steps and tell us what you get?
>
> Cheers,
>
> Osvaldo.
>
>
>
--
___
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

Re: [PyMOL] Change bond thickness

2015-10-17 Thread Jame R . Ketudat-Cairns
?Dear Henrique,

   Sorry, that was supposed to be "set_bond stick_radius, number, selection"

   Best Wishes,

   Jim


From: Henrique C. S. Junior 
Sent: Saturday, October 17, 2015 10:30 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Change bond thickness

As a inorganic chemist, sometimes it is very important to emphasize my metallic 
centers and, to achieve that, I'm using a mix of lightframe (to the ligands) 
and ball and stick (to the metallic center or other relevant parts) (please, 
see the attached image if possible). I'm fairly new to PyMol but I'm sure that 
PyMol can produce beautiful results.
Is there any way to change the thickness of my Ball and Stick bonds (to a 
thinner one)?

Thanks in advance

--
Henrique C. S. Junior
Químico Industrial - UFRRJ
Mestrando em Química Inorgânica - UFRRJ
Centro de Processamento de Dados - PMP
--
___
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

Re: [PyMOL] Change bond thickness

2015-10-17 Thread Osvaldo Martin
Hi Henrique,

Given that you are new to PyMOL I just want to add that you can explore all
the available settings and their values going to settings --> edit all (on
the external GUI).

Cheers,
Osvaldo.



On Sat, Oct 17, 2015 at 9:12 AM, Jame R.Ketudat-Cairns 
wrote:

> Deaer Henrique,
>
>This is easy to find in "ball and stick" in the Wiki, but it appears to
> be down:
>
> set stick_radius, number, selection
>
> where number is your stick radius, try 0.1 to 0.2 and play with it
> (selection is the object name for your ball and stick representation or
> leave off for everything).
>
>   You can also adjust the sphere size with:
>
> set sphere_scale, number, selection
>
>   Best Wishes,
>
>Jim
> --
> *From:* Henrique C. S. Junior 
> *Sent:* Saturday, October 17, 2015 10:30 AM
> *To:* pymol-users@lists.sourceforge.net
> *Subject:* [PyMOL] Change bond thickness
>
> As a inorganic chemist, sometimes it is very important to emphasize my
> metallic centers and, to achieve that, I'm using a mix of lightframe (to
> the ligands) and ball and stick (to the metallic center or other relevant
> parts) (please, see the attached image if possible). I'm fairly new to
> PyMol but I'm sure that PyMol can produce beautiful results.
> Is there any way to change the thickness of my Ball and Stick bonds (to a
> thinner one)?
>
> Thanks in advance
>
> --
> *Henrique C. S. Junior*
> Químico Industrial - UFRRJ
> Mestrando em Química Inorgânica - UFRRJ
> Centro de Processamento de Dados - PMP
>
>
> --
>
> ___
> 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
>
--
___
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

Re: [PyMOL] Change bond thickness

2015-10-17 Thread Jame R . Ketudat-Cairns
Deaer Henrique,

   This is easy to find in "ball and stick" in the Wiki, but it appears to be 
down:

set stick_radius, number, selection

where number is your stick radius, try 0.1 to 0.2 and play with it (selection 
is the object name for your ball and stick representation or leave off for 
everything).

  You can also adjust the sphere size with:

set sphere_scale, number, selection

  Best Wishes,

   Jim


From: Henrique C. S. Junior 
Sent: Saturday, October 17, 2015 10:30 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Change bond thickness

As a inorganic chemist, sometimes it is very important to emphasize my metallic 
centers and, to achieve that, I'm using a mix of lightframe (to the ligands) 
and ball and stick (to the metallic center or other relevant parts) (please, 
see the attached image if possible). I'm fairly new to PyMol but I'm sure that 
PyMol can produce beautiful results.
Is there any way to change the thickness of my Ball and Stick bonds (to a 
thinner one)?

Thanks in advance

--
Henrique C. S. Junior
Químico Industrial - UFRRJ
Mestrando em Química Inorgânica - UFRRJ
Centro de Processamento de Dados - PMP
--
___
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

[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

--
___
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

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])), int(255 * float(bgcolor[2])))

A quick and dirty workaround is to change

ret += "\nbgcolor:%02x%02x%02x" % (int(255 * float(bgcolor[0])), \
int(255 * float(bgcolor[1])), int(255 * float(bgcolor[2])))

to

ret += "\nbgcolor:%02x%02x%02x" % (int(255 * float(bgcolor[0])), \
int(255 * float(bgcolor[0])), int(255 * float(bgcolor[0])))

I guess Thomas could provide a proper solution to this problem. The
problem, if I get it correctly, is that

cmd.get_setting_tuple('bg_rgb')[1]

is returning an integer-code for the colors, while the plugin is expecting
and RGB-code.

Cheers,
Osvaldo.



On Sat, Oct 17, 2015 at 10:35 AM, Albert  wrote:

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
>
>
> --
>
> ___
> 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
>
​
--
___
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

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 scene I always get a
black background.

Cheers,

Osvaldo,


On Sat, Oct 17, 2015 at 1:50 PM, Osvaldo Martin 
wrote:

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])), int(255 * float(bgcolor[2])))
>
> A quick and dirty workaround is to change
>
> ret += "\nbgcolor:%02x%02x%02x" % (int(255 * float(bgcolor[0])), \
> int(255 * float(bgcolor[1])), int(255 * float(bgcolor[2])))
>
> to
>
> ret += "\nbgcolor:%02x%02x%02x" % (int(255 * float(bgcolor[0])), \
> int(255 * float(bgcolor[0])), int(255 * float(bgcolor[0])))
>
> I guess Thomas could provide a proper solution to this problem. The
> problem, if I get it correctly, is that
>
> cmd.get_setting_tuple('bg_rgb')[1]
>
> is returning an integer-code for the colors, while the plugin is expecting
> and RGB-code.
>
> Cheers,
> Osvaldo.
>
>
>
> On Sat, Oct 17, 2015 at 10:35 AM, Albert  wrote:
>
> 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
>>
>>
>> --
>>
>> ___
>> 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
>>
> ​
>
​
--
___
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

Re: [PyMOL] Change bond thickness

2015-10-17 Thread Henrique C. S. Junior
Thank you all for your kind reply, it worked like a charm!

2015-10-17 4:53 GMT-03:00 Osvaldo Martin :

> Hi Henrique,
>
> Given that you are new to PyMOL I just want to add that you can explore
> all the available settings and their values going to settings --> edit all
> (on the external GUI).
>
> Cheers,
> Osvaldo.
>
>
>
> On Sat, Oct 17, 2015 at 9:12 AM, Jame R.Ketudat-Cairns 
> wrote:
>
>> Deaer Henrique,
>>
>>This is easy to find in "ball and stick" in the Wiki, but it appears
>> to be down:
>>
>> set stick_radius, number, selection
>>
>> where number is your stick radius, try 0.1 to 0.2 and play with it
>> (selection is the object name for your ball and stick representation or
>> leave off for everything).
>>
>>   You can also adjust the sphere size with:
>>
>> set sphere_scale, number, selection
>>
>>   Best Wishes,
>>
>>Jim
>> --
>> *From:* Henrique C. S. Junior 
>> *Sent:* Saturday, October 17, 2015 10:30 AM
>> *To:* pymol-users@lists.sourceforge.net
>> *Subject:* [PyMOL] Change bond thickness
>>
>> As a inorganic chemist, sometimes it is very important to emphasize my
>> metallic centers and, to achieve that, I'm using a mix of lightframe (to
>> the ligands) and ball and stick (to the metallic center or other relevant
>> parts) (please, see the attached image if possible). I'm fairly new to
>> PyMol but I'm sure that PyMol can produce beautiful results.
>> Is there any way to change the thickness of my Ball and Stick bonds (to a
>> thinner one)?
>>
>> Thanks in advance
>>
>> --
>> *Henrique C. S. Junior*
>> Químico Industrial - UFRRJ
>> Mestrando em Química Inorgânica - UFRRJ
>> Centro de Processamento de Dados - PMP
>>
>>
>> --
>>
>> ___
>> 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
>>
>
>


-- 
*Henrique C. S. Junior*
Químico Industrial - UFRRJ
Mestrando em Química Inorgânica - UFRRJ
Centro de Processamento de Dados - PMP
--
___
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

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 stuff
   3. cd to the folder creating during unpacking
   4. run the script by doing

run exportToWeb.py

   5. then run the commnand

exportToWeb PymolObjectName

   where PymolObjectName is the name of the pymol object you want to export
   6. check the unpacked folder for a file with the name
   PymolObjectName.html

Could you try to follow these steps and tell us what you get?

Cheers,

Osvaldo.


On Sat, Oct 17, 2015 at 3:24 PM, Albert  wrote:

Dear Osvaldo:
>
> thanks a lot for the reply.
>
> I change the pymol2glmol.py as you sugguested, and rerun it with command:
>
> python pymol2glmol.py test.pse
>
> and there is still nothing new generated
>
> do you have any further comments? I've attached the files.
>
> Thanks again
>
> Albert
>
>
>
> On 10/17/2015 02:01 PM, Osvaldo Martin wrote:
>
> 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 scene I always get a
> black background.
>
> Cheers,
>
> Osvaldo,
>
>
> ​
--
___
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

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 "exportToWeb.py", line 118, in dump_rep
ret += parseObjMol(obj)
  File "exportToWeb.py", line 50, in parseObjMol
if (rep[5] == 1):
TypeError: 'int' object has no attribute '__getitem__'


If possible, would you please give me some suggestions?

Thanks a lot

Albert




On 10/17/2015 04:36 PM, Osvaldo Martin wrote:


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 stuff
 3. cd to the folder creating during unpacking
 4. run the script by doing
|run exportToWeb.py |
 5. then run the commnand
|exportToWeb PymolObjectName |
where PymolObjectName is the name of the pymol object you want to
export
 6. check the unpacked folder for a file with the name
PymolObjectName.html

Could you try to follow these steps and tell us what you get?

Cheers,

Osvaldo.



--
___
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