[PyMOL] Pymol build from source

2009-07-07 Thread Andre Joseph
Dear Delano Scientific support

I've been fetching source code from the sourceforge repositories yesterday.
I've no error or warning during "./configure", "make" or "make install"
steps.
However, when I launch pymol, I've the following error:

Traceback (most recent call last):
>   File "/home/joseph/software/pymol/modules/launch_pymol.py", line 32, in
> 
> import pymol
>   File "/home/joseph/software/pymol/modules/pymol/__init__.py", line 472,
> in 
> import _cmd
> ImportError: /home/joseph/software/pymol/modules/pymol/_cmd.so: undefined
> symbol: molfile_vaspparchgplugin_init


I've found in the archive that it might come from a problem in "setup.py"
file but I couldn't figure out what was missing (http://tinyurl.com/ndpafb).
I've been building PyMOL from source for a year or so and never faced up any
problem. Could it come from the sources or is a problem of dependancies?

Thank you for your support.

Joseph
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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] unexpected EOF while parsing

2009-07-07 Thread Tsjerk Wassenaar
Hi Jouko,

I think you went through the Python and Pymol tutorials a bit too fast
;) You're writing a Python script to be loaded with 'run'. That means
you have to adhere to Python API and can't use the Pymol specific
language. E.g. you can't use 'png pdb', but have to use 'cmd.png(pdb)'
in which case pdb will be treated as a variable rather than a string.
And you definitely can't use '@something.pml'.

The EOF is because you violated one of the basic rules of Python: it
uses indentation to structure programming. Thus after a for loop you
have to start an indented line.

Furthermore:
- range by default starts from 0: range(0,Sections) is equal to range(Sections)
- load will strip .pdb from the filename, so you wouldn't be able to
use the variable pdb to point to it; better specify a name
- png probably adds .png to the name, but it's good to make sure it does

###

from pymol.cgo import *
import colorsys,sys,re
from pymol import cmd

z=-8.153
inc=0.5
Sections=100
for j in range(0, Sections):

pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"+
str(z) + ".pdb"
load(pdb,pdb)
cmd.do("@c:/b_color8.plm")
cmd.png(pdb+".png")
cmd.delete(pdb)
z=z+inc

Hope it helps,

Tsjerk

On Tue, Jul 7, 2009 at 3:17 AM,  wrote:
> I am new to pymol and python.  I have a number of cross
> sections of lysozyme.  I want to display them one by one,
> color them using a script file that I have written earlier,
> and save the image.  I have written a script file that I had
> hoped would do this.  I have a couple problems with script
> file, but the one that is frustrating me the most is that
> immediately after the beginning of for loop pymol says that
> there in an unexpected EOF.  The other problem is that when I
> try to use the variable pdb, pymol does not use the value of
> the variable, but the variable name itself.  I have pasted my
> script file below and part of the log file.
>
> from pymol.cgo import *
> import colorsys,sys,re
> from pymol import cmd
>
> z=-8.153
> inc=0.5
> Sections=100
> for j in range(0, Sections):
>
> pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
> + str(z) + ".pdb"
>      load pdb
>     �...@c:/b_color8.plm
>      png pdb
>      delete pdb
>      z=z+inc
>
>
> PyMOL>@c:/Users/jouko/CrossSections.plm
> PyMOL>from pymol.cgo import *
> PyMOL>import colorsys,sys,re
> PyMOL>from pymol import cmd
> PyMOL>z=-8.153
> PyMOL>inc=0.5
> PyMOL>Sections=100
> PyMOL>for j in range(o, Sections):
> Traceback (most recent call last):
>  File "C:\Program Files\DeLano
> Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
>   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>  File "", line 1
>    for j in range(o, Sections):
>                                ^
> SyntaxError: unexpected EOF while parsing
> PyMOL>pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
> + str(z) + ".pdb"
> PyMOL>load pdb
> ExecutiveProcessPDBFile-Error: Unable to open file 'pdb'.
>
> Thanks in advance for your advice.
>
>
> Jouko
>
> --
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/blackberry
> ___
> 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
>



-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] unexpected EOF while parsing

2009-07-07 Thread Gerebtzoff, Gregori
Jouko,

Try to use the
cmd.load(pdb)
command instead of
load pdb

Apparently, the load statement takes a file name as argument, not a variable, 
whereas the api call (cmd.load) can handle variables.

Best,

Grégori

-Original Message-
From: jo...@uchicago.edu [mailto:jo...@uchicago.edu] 
Sent: Tuesday, July 07, 2009 3:18 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] unexpected EOF while parsing

I am new to pymol and python.  I have a number of cross
sections of lysozyme.  I want to display them one by one,
color them using a script file that I have written earlier,
and save the image.  I have written a script file that I had
hoped would do this.  I have a couple problems with script
file, but the one that is frustrating me the most is that
immediately after the beginning of for loop pymol says that
there in an unexpected EOF.  The other problem is that when I
try to use the variable pdb, pymol does not use the value of
the variable, but the variable name itself.  I have pasted my
script file below and part of the log file.

from pymol.cgo import *
import colorsys,sys,re
from pymol import cmd

z=-8.153
inc=0.5
Sections=100
for j in range(0, Sections):
 
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
+ str(z) + ".pdb"
  load pdb
  @c:/b_color8.plm
  png pdb
  delete pdb
  z=z+inc


PyMOL>@c:/Users/jouko/CrossSections.plm
PyMOL>from pymol.cgo import *
PyMOL>import colorsys,sys,re
PyMOL>from pymol import cmd
PyMOL>z=-8.153
PyMOL>inc=0.5
PyMOL>Sections=100
PyMOL>for j in range(o, Sections):
Traceback (most recent call last):
 File "C:\Program Files\DeLano
Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
 File "", line 1
for j in range(o, Sections):
^
SyntaxError: unexpected EOF while parsing
PyMOL>pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
+ str(z) + ".pdb"
PyMOL>load pdb
ExecutiveProcessPDBFile-Error: Unable to open file 'pdb'.

Thanks in advance for your advice.


Jouko



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] CAVER resolved (sort of)

2009-07-07 Thread Harry M. Greenblatt

BS"D

Dear All,

  Scott Dixon pointed out that you can optionally get JRE 1.6 for  
OSX from the Apple website.  I did this, and CAVER succeeded (but see  
below).
One does have to make sure to use Java Preferences utility in the  
utilities folder to make sure JRE 1.6 (i.e., J2SE 6.0) is used  
instead of 1.5.


See

http://www.apple.com/downloads/macosx/apple/application_updates/ 
javaformacosx105update1.html


Then you can update:

http://www.apple.com/downloads/macosx/apple/application_updates/ 
javaformacosx105update4.html



 Unfortunately this is only for 10.5.7, Intel 64-bit machines, so  
PPC machines, and even older Intel machines are not helped.



Harry

 
-

Harry M. Greenblatt
Associate Staff Scientist
Dept of Structural Biology   harry.greenbl...@weizmann.ac.il
Weizmann Institute of SciencePhone:  972-8-934-3625
Rehovot, 76100   Facsimile:   972-8-934-4159
Israel



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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] unexpected EOF while parsing

2009-07-07 Thread jouko
Thanks to you and Gregori Gerebtzoff, I can now load the pdb,
color the image, and save it as a picture.  However I can only
do that for the first cross section.  I am still getting the
unexpected EOF error.  I did have the line indented after the
loop.  I think that maybe when I copied and pasted the script
to the email the tab was lost, so this time I am adding the
script file as an attachment.

Thanks,

Jouko

P.S.  I found that @/home/jouko/b_color8.plm and
cmd.do("@/home/jouko/b_color8.plm")  both work.

 Original message 
>Date: Tue, 7 Jul 2009 09:17:53 +0200
>From: Tsjerk Wassenaar   
>Subject: Re: [PyMOL] unexpected EOF while parsing  
>To: jo...@uchicago.edu
>Cc: pymol-users@lists.sourceforge.net
>
>Hi Jouko,
>
>I think you went through the Python and Pymol tutorials a bit
too fast
>;) You're writing a Python script to be loaded with 'run'.
That means
>you have to adhere to Python API and can't use the Pymol specific
>language. E.g. you can't use 'png pdb', but have to use
'cmd.png(pdb)'
>in which case pdb will be treated as a variable rather than a
string.
>And you definitely can't use '@something.pml'.
>
>The EOF is because you violated one of the basic rules of
Python: it
>uses indentation to structure programming. Thus after a for
loop you
>have to start an indented line.
>
>Furthermore:
>- range by default starts from 0: range(0,Sections) is equal
to range(Sections)
>- load will strip .pdb from the filename, so you wouldn't be
able to
>use the variable pdb to point to it; better specify a name
>- png probably adds .png to the name, but it's good to make
sure it does
>
>###
>
>from pymol.cgo import *
>import colorsys,sys,re
>from pymol import cmd
>
>z=-8.153
>inc=0.5
>Sections=100
>for j in range(0, Sections):
>   
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"+
>str(z) + ".pdb"
>load(pdb,pdb)
>cmd.do("@c:/b_color8.plm")
>cmd.png(pdb+".png")
>cmd.delete(pdb)
>z=z+inc
>
>Hope it helps,
>
>Tsjerk
>
>On Tue, Jul 7, 2009 at 3:17 AM,  wrote:
>> I am new to pymol and python.  I have a number of cross
>> sections of lysozyme.  I want to display them one by one,
>> color them using a script file that I have written earlier,
>> and save the image.  I have written a script file that I had
>> hoped would do this.  I have a couple problems with script
>> file, but the one that is frustrating me the most is that
>> immediately after the beginning of for loop pymol says that
>> there in an unexpected EOF.  The other problem is that when I
>> try to use the variable pdb, pymol does not use the value of
>> the variable, but the variable name itself.  I have pasted my
>> script file below and part of the log file.
>>
>> from pymol.cgo import *
>> import colorsys,sys,re
>> from pymol import cmd
>>
>> z=-8.153
>> inc=0.5
>> Sections=100
>> for j in range(0, Sections):
>>
>>
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
>> + str(z) + ".pdb"
>>      load pdb
>>     �...@c:/b_color8.plm
>>      png pdb
>>      delete pdb
>>      z=z+inc
>>
>>
>> PyMOL>@c:/Users/jouko/CrossSections.plm
>> PyMOL>from pymol.cgo import *
>> PyMOL>import colorsys,sys,re
>> PyMOL>from pymol import cmd
>> PyMOL>z=-8.153
>> PyMOL>inc=0.5
>> PyMOL>Sections=100
>> PyMOL>for j in range(o, Sections):
>> Traceback (most recent call last):
>>  File "C:\Program Files\DeLano
>> Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
>>   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>>  File "", line 1
>>    for j in range(o, Sections):
>>                                ^
>> SyntaxError: unexpected EOF while parsing
>>
PyMOL>pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
>> + str(z) + ".pdb"
>> PyMOL>load pdb
>> ExecutiveProcessPDBFile-Error: Unable to open file 'pdb'.
>>
>> Thanks in advance for your advice.
>>
>>
>> Jouko
>>
>>
--
>> Enter the BlackBerry Developer Challenge
>> This is your chance to win up to $100,000 in prizes! For a
limited time,
>> vendors submitting new applications to BlackBerry App
World(TM) will have
>> the opportunity to enter the BlackBerry Developer
Challenge. See full prize
>> details at: http://p.sf.net/sfu/blackberry
>> ___
>> 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
>>
>
>
>
>-- 
>Tsjerk A. Wassenaar, Ph.D.
>Junior UD (post-doc)
>Biomolecular NMR, Bijvoet Center
>Utrecht University
>Padualaan 8
>3584 CH Utrecht
>The Netherlands
>P: +31-30-2539931
>F: +31-30-2537623


CrossSections.plm
Description: Binary data
--
Enter the BlackBerry Developer Challenge  
This is you

[PyMOL] thanks for the help

2009-07-07 Thread Benjamin Michael Owen
thanks for the help everyone. I'll try these ideas out. thanks again!Benjamin

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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 build from source

2009-07-07 Thread Robert Campbell
Dear Joseph,

On Tue, 07 Jul 2009 11:00:10 +0200, Andre Joseph 
wrote:

> Dear Delano Scientific support
> 
> I've been fetching source code from the sourceforge repositories yesterday.
> I've no error or warning during "./configure", "make" or "make install"
> steps.
> However, when I launch pymol, I've the following error:
> 
> Traceback (most recent call last):
> >   File "/home/joseph/software/pymol/modules/launch_pymol.py", line 32, in
> > 
> > import pymol
> >   File "/home/joseph/software/pymol/modules/pymol/__init__.py", line 472,
> > in 
> > import _cmd
> > ImportError: /home/joseph/software/pymol/modules/pymol/_cmd.so: undefined
> > symbol: molfile_vaspparchgplugin_init
> 
> 
> I've found in the archive that it might come from a problem in "setup.py"
> file but I couldn't figure out what was missing (http://tinyurl.com/ndpafb).
> I've been building PyMOL from source for a year or so and never faced up any
> problem. Could it come from the sources or is a problem of dependancies?

I think the recommended way of building PyMOL is with these commands (see
the "INSTALL" file):

python setup.py build
python setup.py install
python setup2.py install

Since I install it in a non-standard location (an NFS file server accessible
from many workstations of both i686 and x86_64 versions of Linux), I add a
prefix to the install command:

  python setup.py install --prefix=/software/Linux

or

  python setup.py install --prefix=/software/Linux_x86_64


Then I keep a saved and modified copy of the pymol script created by the
"python setup2.py install" command and copy that back over the newly created
"pymol" script instead (because I have a few customizations in it).

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] unexpected EOF while parsing

2009-07-07 Thread Tsjerk Wassenaar
Hi Jouko,

You were writing a python script. Now Pymol API can handle basic
Python, but it's not a one-to-one Python interpreter. To include
blocks you have to do more than indentation. You have to put a slash
in front of the for statement and end all but the of the blocks with a
backslash. When trying to do programming, better stick to Python. Save
the following as script.py and use run script.py from within Pymol or
just issue 'pymol script.py':

from pymol import cmd

z=-7.653
inc=0.5
Sections=100
FirstToLast=range(100)
for j in FirstToLast:
pdb="/home/jouko/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
+ str(z) + ".pdb"
cmd.load(pdb)
cmd.do("@/home/jouko/b_color8.plm")
cmd.png(pdb+".png")
cmd.delete(pdb)
z=z+inc
print z

###

Cheers,

Tsjerk

On Tue, Jul 7, 2009 at 5:47 PM,  wrote:
> Thanks to you and Gregori Gerebtzoff, I can now load the pdb,
> color the image, and save it as a picture.  However I can only
> do that for the first cross section.  I am still getting the
> unexpected EOF error.  I did have the line indented after the
> loop.  I think that maybe when I copied and pasted the script
> to the email the tab was lost, so this time I am adding the
> script file as an attachment.
>
> Thanks,
>
> Jouko
>
> P.S.  I found that @/home/jouko/b_color8.plm and
> cmd.do("@/home/jouko/b_color8.plm")  both work.
>
>  Original message 
>>Date: Tue, 7 Jul 2009 09:17:53 +0200
>>From: Tsjerk Wassenaar 
>>Subject: Re: [PyMOL] unexpected EOF while parsing
>>To: jo...@uchicago.edu
>>Cc: pymol-users@lists.sourceforge.net
>>
>>Hi Jouko,
>>
>>I think you went through the Python and Pymol tutorials a bit
> too fast
>>;) You're writing a Python script to be loaded with 'run'.
> That means
>>you have to adhere to Python API and can't use the Pymol specific
>>language. E.g. you can't use 'png pdb', but have to use
> 'cmd.png(pdb)'
>>in which case pdb will be treated as a variable rather than a
> string.
>>And you definitely can't use '@something.pml'.
>>
>>The EOF is because you violated one of the basic rules of
> Python: it
>>uses indentation to structure programming. Thus after a for
> loop you
>>have to start an indented line.
>>
>>Furthermore:
>>- range by default starts from 0: range(0,Sections) is equal
> to range(Sections)
>>- load will strip .pdb from the filename, so you wouldn't be
> able to
>>use the variable pdb to point to it; better specify a name
>>- png probably adds .png to the name, but it's good to make
> sure it does
>>
>>###
>>
>>from pymol.cgo import *
>>import colorsys,sys,re
>>from pymol import cmd
>>
>>z=-8.153
>>inc=0.5
>>Sections=100
>>for j in range(0, Sections):
>>
> pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"+
>>str(z) + ".pdb"
>>    load(pdb,pdb)
>>    cmd.do("@c:/b_color8.plm")
>>    cmd.png(pdb+".png")
>>    cmd.delete(pdb)
>>    z=z+inc
>>
>>Hope it helps,
>>
>>Tsjerk
>>
>>On Tue, Jul 7, 2009 at 3:17 AM,  wrote:
>>> I am new to pymol and python.  I have a number of cross
>>> sections of lysozyme.  I want to display them one by one,
>>> color them using a script file that I have written earlier,
>>> and save the image.  I have written a script file that I had
>>> hoped would do this.  I have a couple problems with script
>>> file, but the one that is frustrating me the most is that
>>> immediately after the beginning of for loop pymol says that
>>> there in an unexpected EOF.  The other problem is that when I
>>> try to use the variable pdb, pymol does not use the value of
>>> the variable, but the variable name itself.  I have pasted my
>>> script file below and part of the log file.
>>>
>>> from pymol.cgo import *
>>> import colorsys,sys,re
>>> from pymol import cmd
>>>
>>> z=-8.153
>>> inc=0.5
>>> Sections=100
>>> for j in range(0, Sections):
>>>
>>>
> pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
>>> + str(z) + ".pdb"
>>>      load pdb
>>>     �...@c:/b_color8.plm
>>>      png pdb
>>>      delete pdb
>>>      z=z+inc
>>>
>>>
>>> PyMOL>@c:/Users/jouko/CrossSections.plm
>>> PyMOL>from pymol.cgo import *
>>> PyMOL>import colorsys,sys,re
>>> PyMOL>from pymol import cmd
>>> PyMOL>z=-8.153
>>> PyMOL>inc=0.5
>>> PyMOL>Sections=100
>>> PyMOL>for j in range(o, Sections):
>>> Traceback (most recent call last):
>>>  File "C:\Program Files\DeLano
>>> Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
>>>   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>>>  File "", line 1
>>>    for j in range(o, Sections):
>>>                                ^
>>> SyntaxError: unexpected EOF while parsing
>>>
> PyMOL>pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
>>> + str(z) + ".pdb"
>>> PyMOL>load pdb
>>> ExecutiveProcessPDBFile-Error: Unable to open file 'pdb'.
>>>
>>> Thanks in advance for your advice.
>>>
>>>
>>> Jouko
>>>
>>>
> 

Re: [PyMOL] unexpected EOF while parsing

2009-07-07 Thread jouko
Thanks.  It works now.

 Original message 
>Date: Tue, 7 Jul 2009 18:11:56 +0200
>From: Tsjerk Wassenaar   
>Subject: Re: [PyMOL] unexpected EOF while parsing  
>To: jo...@uchicago.edu, pymol-users

>
>Hi Jouko,
>
>You were writing a python script. Now Pymol API can handle basic
>Python, but it's not a one-to-one Python interpreter. To include
>blocks you have to do more than indentation. You have to put
a slash
>in front of the for statement and end all but the of the
blocks with a
>backslash. When trying to do programming, better stick to
Python. Save
>the following as script.py and use run script.py from within
Pymol or
>just issue 'pymol script.py':
>
>from pymol import cmd
>
>z=-7.653
>inc=0.5
>Sections=100
>FirstToLast=range(100)
>for j in FirstToLast:
>
pdb="/home/jouko/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
>+ str(z) + ".pdb"
>   cmd.load(pdb)
>   cmd.do("@/home/jouko/b_color8.plm")
>   cmd.png(pdb+".png")
>   cmd.delete(pdb)
>   z=z+inc
>   print z
>
>###
>
>Cheers,
>
>Tsjerk
>
>On Tue, Jul 7, 2009 at 5:47 PM,  wrote:
>> Thanks to you and Gregori Gerebtzoff, I can now load the pdb,
>> color the image, and save it as a picture.  However I can only
>> do that for the first cross section.  I am still getting the
>> unexpected EOF error.  I did have the line indented after the
>> loop.  I think that maybe when I copied and pasted the script
>> to the email the tab was lost, so this time I am adding the
>> script file as an attachment.
>>
>> Thanks,
>>
>> Jouko
>>
>> P.S.  I found that @/home/jouko/b_color8.plm and
>> cmd.do("@/home/jouko/b_color8.plm")  both work.
>>
>>  Original message 
>>>Date: Tue, 7 Jul 2009 09:17:53 +0200
>>>From: Tsjerk Wassenaar 
>>>Subject: Re: [PyMOL] unexpected EOF while parsing
>>>To: jo...@uchicago.edu
>>>Cc: pymol-users@lists.sourceforge.net
>>>
>>>Hi Jouko,
>>>
>>>I think you went through the Python and Pymol tutorials a bit
>> too fast
>>>;) You're writing a Python script to be loaded with 'run'.
>> That means
>>>you have to adhere to Python API and can't use the Pymol
specific
>>>language. E.g. you can't use 'png pdb', but have to use
>> 'cmd.png(pdb)'
>>>in which case pdb will be treated as a variable rather than a
>> string.
>>>And you definitely can't use '@something.pml'.
>>>
>>>The EOF is because you violated one of the basic rules of
>> Python: it
>>>uses indentation to structure programming. Thus after a for
>> loop you
>>>have to start an indented line.
>>>
>>>Furthermore:
>>>- range by default starts from 0: range(0,Sections) is equal
>> to range(Sections)
>>>- load will strip .pdb from the filename, so you wouldn't be
>> able to
>>>use the variable pdb to point to it; better specify a name
>>>- png probably adds .png to the name, but it's good to make
>> sure it does
>>>
>>>###
>>>
>>>from pymol.cgo import *
>>>import colorsys,sys,re
>>>from pymol import cmd
>>>
>>>z=-8.153
>>>inc=0.5
>>>Sections=100
>>>for j in range(0, Sections):
>>>
>>
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"+
>>>str(z) + ".pdb"
>>>    load(pdb,pdb)
>>>    cmd.do("@c:/b_color8.plm")
>>>    cmd.png(pdb+".png")
>>>    cmd.delete(pdb)
>>>    z=z+inc
>>>
>>>Hope it helps,
>>>
>>>Tsjerk
>>>
>>>On Tue, Jul 7, 2009 at 3:17 AM,  wrote:
 I am new to pymol and python.  I have a number of cross
 sections of lysozyme.  I want to display them one by one,
 color them using a script file that I have written earlier,
 and save the image.  I have written a script file that I had
 hoped would do this.  I have a couple problems with script
 file, but the one that is frustrating me the most is that
 immediately after the beginning of for loop pymol says that
 there in an unexpected EOF.  The other problem is that when I
 try to use the variable pdb, pymol does not use the value of
 the variable, but the variable name itself.  I have pasted my
 script file below and part of the log file.

 from pymol.cgo import *
 import colorsys,sys,re
 from pymol import cmd

 z=-8.153
 inc=0.5
 Sections=100
 for j in range(0, Sections):


>>
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
 + str(z) + ".pdb"
      load pdb
     �...@c:/b_color8.plm
      png pdb
      delete pdb
      z=z+inc


 PyMOL>@c:/Users/jouko/CrossSections.plm
 PyMOL>from pymol.cgo import *
 PyMOL>import colorsys,sys,re
 PyMOL>from pymol import cmd
 PyMOL>z=-8.153
 PyMOL>inc=0.5
 PyMOL>Sections=100
 PyMOL>for j in range(o, Sections):
 Traceback (most recent call last):
  File "C:\Program Files\DeLano
 Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
  File "", line 1
    for j in range(o, Sections):
                                ^
 SyntaxEr

[PyMOL] is this how i would write a coding sequence?

2009-07-07 Thread Benjamin Michael Owen
I'm trying to use a suggestion another pymol user sent to create a sphere of a specific size in a pdb file. Is this the correct coding? I have no experience doing any kind of programming so I am not sure if I did this right. I put the text I entered in in red if that helps anything.bencreate sphere, resi 24 and resi 864 create a new object from resi 864  alter sphere, vdw=10.0 # 28.5  rebuild # necessary if spheres have already been shown  show spheres, sphere  alter_state 1, sphere, x,y,z = 50,60,10 # set desired x,y,z coords  set sphere_transparency, 0.5, sphere # make it transparent  zoom  ray

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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] is this how i would write a coding sequence?

2009-07-07 Thread Michael Lerner
Aha! I knew there was a better way of doing this, but I was stuck on a
machine that only had an old version of PyMOL. Assuming you're using PyMOL
1.0 or newer, you can just use pseudoatom. To create a sphere of radius 10.0
at the xyz position (50.0,60.0,12.0), just do this:

pseudoatom mysphere, pos=[50.0,60.0,12.0], vdw=[10.0]

it will appear as a kind of cross at first. to show it as a sphere, type

show spheres, mysphere

to make it partially transparent, type

set sphere_transparency, 0.5, mysphere

The sphere that you get will look kind of blocky. You can get a perfect
sphere by raytracing, e.g. typing

ray

If you don't mind the fact that it won't be transparent, you can get a
perfect sphere in the normal viewer by typing

set sphere_mode, 5

To go back to normal spheres after you've done that, type

unset sphere_mode

I think this will be easier than the other way I recommended.

Cheers,

-michael

On Tue, Jul 7, 2009 at 1:55 PM, Benjamin Michael Owen
wrote:

> I'm trying to use a suggestion another pymol user sent to create a sphere
> of a specific size in a pdb file. Is this the correct coding? I have no
> experience doing any kind of programming so I am not sure if I did this
> right. I put the text I entered in in red if that helps anything.
>
> ben
>
> create sphere, resi 24 and resi 864 create a new object from resi 864
>
> alter sphere, vdw=10.0 # 28.5
>
> rebuild # necessary if spheres have already been shown
>
> show spheres, sphere
>
> alter_state 1, sphere, x,y,z = 50,60,10 # set desired x,y,z coords
>
> set sphere_transparency, 0.5, sphere # make it transparent
>
> zoom
>
> ray
>
>
> --
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/blackberry
> ___
> 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)
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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] CAVER resolved (sort of)

2009-07-07 Thread Scott Dixon

On Jul 7, 2009, at 5:48 AM, Harry M. Greenblatt wrote:

> BS"D
>
> Dear All,
>
>   Scott Dixon pointed out that you can optionally get JRE 1.6 for  
> OSX from the Apple website.  I did this, and CAVER succeeded (but  
> see below).
> One does have to make sure to use Java Preferences utility in the  
> utilities folder to make sure JRE 1.6 (i.e., J2SE 6.0) is used  
> instead of 1.5.
If there is a problem with switching over completely to JRE 1.6 via  
Java Preferences, then you can create a shell script to run a  
particular program under JRE 1.6 while leaving the Java Preferences at  
the default.  Use something like:

JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/ 
java
$(JAVA) your_program_name_and_options

to run a program under JRE 1.6
>
> See
>
> http://www.apple.com/downloads/macosx/apple/application_updates/javaformacosx105update1.html
>
> Then you can update:
>
> http://www.apple.com/downloads/macosx/apple/application_updates/javaformacosx105update4.html
>
>
>  Unfortunately this is only for 10.5.7, Intel 64-bit machines, so  
> PPC machines, and even older Intel machines are not helped.
PPC machines are certainly left out.  I think that almost all of the  
Intel machines will run JRE 1.6 fine.  For example, my 2.5 year old  
MacBook Pro works fine.
Scott
>
>
> Harry
>
> -
> Harry M. Greenblatt
> Associate Staff Scientist
> Dept of Structural Biology   harry.greenbl...@weizmann.ac.il
> Weizmann Institute of SciencePhone:  972-8-934-3625
> Rehovot, 76100   Facsimile:   972-8-934-4159
> Israel
>
>
>
> --
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited  
> time,
> vendors submitting new applications to BlackBerry App World(TM) will  
> have
> the opportunity to enter the BlackBerry Developer Challenge. See  
> full prize
> details at: 
> http://p.sf.net/sfu/blackberry___
> 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- 
> us...@lists.sourceforge.net


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] unexpected EOF while parsing

2009-07-07 Thread Warren DeLano
> To include
> blocks you have to do more than indentation. You have to put a slash
> in front of the for statement and end all but the of the blocks with a
> backslash. 

Actually, nowadays you can just wrap Python blocks with the statements: 
"python" and "python end".  For example:

# example pymol script an embedded Python block

dele all
reset

python

for i in range(1,10):
   print i
   cmd.pseudoatom(pos=[i,i,i],color='auto')

python end

zoom (all), 10
show spheres
rock

# use box wizard to create some walls:

refresh
wizard box
cmd.get_wizard().set_mode("walls")
wizard
dele box_points

turn x,-70
turn y,-30
turn z,-10

ray

# end example

Cheers,
Warren


> -Original Message-
> From: Tsjerk Wassenaar [mailto:tsje...@gmail.com]
> Sent: Tuesday, July 07, 2009 9:16 AM
> To: jo...@uchicago.edu; pymol-users
> Subject: Re: [PyMOL] unexpected EOF while parsing
> 
> Hi Jouko,
> 
> You were writing a python script. Now Pymol API can handle basic
> Python, but it's not a one-to-one Python interpreter. To include
> blocks you have to do more than indentation. You have to put a slash
> in front of the for statement and end all but the of the blocks with a
> backslash. When trying to do programming, better stick to Python. Save
> the following as script.py and use run script.py from within Pymol or
> just issue 'pymol script.py':
> 
> from pymol import cmd
> 
> z=-7.653
> inc=0.5
> Sections=100
> FirstToLast=range(100)
> for j in FirstToLast:
>   pdb="/home/jouko/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
> + str(z) + ".pdb"
>   cmd.load(pdb)
>   cmd.do("@/home/jouko/b_color8.plm")
>   cmd.png(pdb+".png")
>   cmd.delete(pdb)
>   z=z+inc
>   print z
> 
> ###
> 
> Cheers,
> 
> Tsjerk
> 
> On Tue, Jul 7, 2009 at 5:47 PM,  wrote:
> > Thanks to you and Gregori Gerebtzoff, I can now load the pdb,
> > color the image, and save it as a picture.  However I can only
> > do that for the first cross section.  I am still getting the
> > unexpected EOF error.  I did have the line indented after the
> > loop.  I think that maybe when I copied and pasted the script
> > to the email the tab was lost, so this time I am adding the
> > script file as an attachment.
> >
> > Thanks,
> >
> > Jouko
> >
> > P.S.  I found that @/home/jouko/b_color8.plm and
> > cmd.do("@/home/jouko/b_color8.plm")  both work.
> >
> >  Original message 
> >>Date: Tue, 7 Jul 2009 09:17:53 +0200
> >>From: Tsjerk Wassenaar 
> >>Subject: Re: [PyMOL] unexpected EOF while parsing
> >>To: jo...@uchicago.edu
> >>Cc: pymol-users@lists.sourceforge.net
> >>
> >>Hi Jouko,
> >>
> >>I think you went through the Python and Pymol tutorials a bit
> > too fast
> >>;) You're writing a Python script to be loaded with 'run'.
> > That means
> >>you have to adhere to Python API and can't use the Pymol specific
> >>language. E.g. you can't use 'png pdb', but have to use
> > 'cmd.png(pdb)'
> >>in which case pdb will be treated as a variable rather than a
> > string.
> >>And you definitely can't use '@something.pml'.
> >>
> >>The EOF is because you violated one of the basic rules of
> > Python: it
> >>uses indentation to structure programming. Thus after a for
> > loop you
> >>have to start an indented line.
> >>
> >>Furthermore:
> >>- range by default starts from 0: range(0,Sections) is equal
> > to range(Sections)
> >>- load will strip .pdb from the filename, so you wouldn't be
> > able to
> >>use the variable pdb to point to it; better specify a name
> >>- png probably adds .png to the name, but it's good to make
> > sure it does
> >>
> >>###
> >>
> >>from pymol.cgo import *
> >>import colorsys,sys,re
> >>from pymol import cmd
> >>
> >>z=-8.153
> >>inc=0.5
> >>Sections=100
> >>for j in range(0, Sections):
> >>
> > pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-
> 4a/DensityCube_Lysozyme2-4a_"+
> >>str(z) + ".pdb"
> >>    load(pdb,pdb)
> >>    cmd.do("@c:/b_color8.plm")
> >>    cmd.png(pdb+".png")
> >>    cmd.delete(pdb)
> >>    z=z+inc
> >>
> >>Hope it helps,
> >>
> >>Tsjerk
> >>
> >>On Tue, Jul 7, 2009 at 3:17 AM,  wrote:
> >>> I am new to pymol and python.  I have a number of cross
> >>> sections of lysozyme.  I want to display them one by one,
> >>> color them using a script file that I have written earlier,
> >>> and save the image.  I have written a script file that I had
> >>> hoped would do this.  I have a couple problems with script
> >>> file, but the one that is frustrating me the most is that
> >>> immediately after the beginning of for loop pymol says that
> >>> there in an unexpected EOF.  The other problem is that when I
> >>> try to use the variable pdb, pymol does not use the value of
> >>> the variable, but the variable name itself.  I have pasted my
> >>> script file below and part of the log file.
> >>>
> >>> from pymol.cgo import *
> >>> import colorsys,sys,re
> >>> from pymol import cmd
> >>>
> >>> z=-8.153
> >>> inc=0.5
> >>> Sections=100
> >>> for j in range(0, Sections):
> >>>
> >>

Re: [PyMOL] Pymol build from source

2009-07-07 Thread Warren DeLano
Robert & Joseph:

I just updated and tested both of the distutils and autotools
open-source build systems to match the current source -- you should be
good to go.

please "svn update" and retry

Cheers,
Warren

> -Original Message-
> From: Robert Campbell [mailto:robert.campb...@queensu.ca]
> Sent: Tuesday, July 07, 2009 9:04 AM
> To: pymol-users@lists.sourceforge.net
> Subject: Re: [PyMOL] Pymol build from source
> 
> Dear Joseph,
> 
> On Tue, 07 Jul 2009 11:00:10 +0200, Andre Joseph

> wrote:
> 
> > Dear Delano Scientific support
> >
> > I've been fetching source code from the sourceforge repositories
> yesterday.
> > I've no error or warning during "./configure", "make" or "make
install"
> > steps.
> > However, when I launch pymol, I've the following error:
> >
> > Traceback (most recent call last):
> > >   File "/home/joseph/software/pymol/modules/launch_pymol.py", line
32,
> in
> > > 
> > > import pymol
> > >   File "/home/joseph/software/pymol/modules/pymol/__init__.py",
line
> 472,
> > > in 
> > > import _cmd
> > > ImportError: /home/joseph/software/pymol/modules/pymol/_cmd.so:
> undefined
> > > symbol: molfile_vaspparchgplugin_init
> >
> >
> > I've found in the archive that it might come from a problem in
> "setup.py"
> > file but I couldn't figure out what was missing
> (http://tinyurl.com/ndpafb).
> > I've been building PyMOL from source for a year or so and never
faced up
> any
> > problem. Could it come from the sources or is a problem of
dependancies?
> 
> I think the recommended way of building PyMOL is with these commands
(see
> the "INSTALL" file):
> 
> python setup.py build
> python setup.py install
> python setup2.py install
> 
> Since I install it in a non-standard location (an NFS file server
> accessible
> from many workstations of both i686 and x86_64 versions of Linux), I
add a
> prefix to the install command:
> 
>   python setup.py install --prefix=/software/Linux
> 
> or
> 
>   python setup.py install --prefix=/software/Linux_x86_64
> 
> 
> Then I keep a saved and modified copy of the pymol script created by
the
> "python setup2.py install" command and copy that back over the newly
> created
> "pymol" script instead (because I have a few customizations in it).
> 
> Cheers,
> Rob
> --
> Robert L. Campbell, Ph.D.
> Senior Research Associate/Adjunct Assistant Professor
> Botterell Hall Rm 644
> Department of Biochemistry, Queen's University,
> Kingston, ON K7L 3N6  Canada
> Tel: 613-533-6821Fax: 613-533-2497
> 
http://pldserver1.biochem.queensu.ca/~rlc
> 
>

--
> 
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited
time,
> vendors submitting new applications to BlackBerry App World(TM) will
have
> the opportunity to enter the BlackBerry Developer Challenge. See full
> prize
> details at: http://p.sf.net/sfu/blackberry
> ___
> 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
> 
> 
> 



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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