Hi,
Why can't you use set_name tun1, ..., etc? The attempt trying to change
names is quite odd, and won't do what you want anyway.
You could use
basename="your_tag"
cmd.set_name(cmd.get_object_list()[0], basename+"_subtag")
... and so on.
Cheers,
Tsjerk
On Mar 21, 2012 6:56 AM, "Sajeewa Pemasinghe" <sajeew...@gmail.com> wrote:
Hi everyone,
I have a pml script by which I am trying to change 6 object names. These
are on molecular tunnels. The 6 object names are
Total_protein
start (starting point of the tunnels)
crisscross
tun1 (tunnel1)
tun2 (tunnel2)
tun3 (tunnel3)
Objects 1,4,5 and 6 can be accessed
as (cmd.get_object_list())[0], (cmd.get_object_list())[1],
(cmd.get_object_list())[2], (cmd.get_object_list())[3]
My script is
set_name crisscross,E125Dch113nscris
set_name start,E125Dch113nsst
(cmd.get_object_list())[0]=E125Dch113ns
(cmd.get_object_list())[1]=E125Dch113nstn1
(cmd.get_object_list())[2]=E125Dch113nstn2
(cmd.get_object_list())[3]=E125Dch113nstn3
Although the first two lines work the other lines give errors as
(cmd.get_object_list())[0]=E125Dch113ns
Traceback (most recent call last):
File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
File "<string>", line 1, in <module>
NameError: name 'E125Dch113ns' is not defined
PyMOL>(cmd.get_object_list())[1]=E125Dch113nstn1
Traceback (most recent call last):
File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
File "<string>", line 1, in <module>
NameError: name 'E125Dch113nstn1' is not defined
PyMOL>(cmd.get_object_list())[2]=E125Dch113nstn2
Traceback (most recent call last):
File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
File "<string>", line 1, in <module>
NameError: name 'E125Dch113nstn2' is not defined
changing the names in this iterative fashion is really needed for me coz I
am creating the pml script iteratively using a java program for 240 files.
Could you please give me suggestions for modifications to iteratively
change the object names. This would help my work really big.
Thank you
Sajeewa
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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