Re: [PyMOL] manipulate standard error ?

2006-03-13 Thread Sebastien Moretti
Lind, Kenneth wrote: Hi Sebastien, This sounds like a strange thing to do. First, I would ask why are you getting an error? Rather than hiding the error, you should fix it... If that is not possible, a typical python way of doing this is to use a try/except wrapping. for example: try:

Re: [PyMOL] manipulate standard error ?

2006-03-13 Thread Sebastien Moretti
Hi, If you are getting unwanted PyMOL standard errors you can turn them off using the cmd.feedback() commands: cmd.feedback('disable', 'selector', 'everything') cmd.feedback('disable', 'executive', 'everything') to turn them on again: cmd.feedback('enable', 'selector', 'everything')

Re: [PyMOL] manipulate standard error ?

2006-03-10 Thread Sebastien Moretti
Hello, yes. maybe. if you are talking about printing to standard error, then : import sys sys.stderr.write(hello, stderr!) will do it. if, on the other hand, you mean something more complicated to do with manipulating the shell (redirection...?) than I don't know, sorry. gilleain

[PyMOL] manipulate standard error ?

2006-03-09 Thread Sebastien Moretti
Hello, I would like to know if there is a way to manipulate standard error redirection into pymol scripting language ? Thanks -- Sébastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS UPR 2589 163 Avenue de Luminy, case 934 13288 Marseille cedex 9 (France)

Re: [PyMOL] problem with CASTp plugin

2005-11-04 Thread Sebastien Moretti
Hello, We are running Python v2.2.3 on Red Hat Enterprise 3 which is almost like Red Hat 9 and/or Fedora Core 1. Our RedHat version seems to be choking on the pyc file. The following is the error we get. Exception in plugin 'CASTpyMOL' -- Traceback follows... Traceback (most recent call

Re: [PyMOL] Viewing cavities?

2005-11-02 Thread Sebastien Moretti
Marcus, Here is one way (courtesy Kyle Lassila): Check out VOIDOO: http://xray.bmc.uu.se/usf/voidoo.html Then: Use VOIDOO to make a map of the cavity. That gives a map in one of the electron density formats, .ezd. Then use MAPMAN (also found as Uppsala Software Factory) to convert to

Re: [PyMOL] Legend box

2005-10-26 Thread Sebastien Moretti
I looked into this a little. I think the apbs script (its apbs.py or something -- if you can't find it search for it on google) calls a function called cmd.ramp_new() with a bunch of arguements. Apparently this 'ramp' is a built in c-level object. You maybe able to mimic the code in apbs.

Re: [PyMOL] Query variable value

2005-10-20 Thread Sebastien Moretti
PyExperts: When inside PyMOL, how do I find out the value of a variable without using 'set'? For example, I can type: set specular, 1 and then I know, specular = 1. But how do I find out specular's (or ANY variable's) value without changing it? Thanks, Olivier Hello Olivier, For PyMOL

[Re: [PyMOL] [colors frozen for rendering modes defined in .pymolrc]]

2005-10-18 Thread Sebastien Moretti
Sebastien, I cannot change the color for rendering modes I defined. I do not understand what you mean by this. Cheers, Warren I mean that the color, for cartoon view, is unchangeable when 'set cartoon_color' is defined in the $HOME/.pymolrc file. Thus, when I define 'set cartoon_color'

Re: [PyMOL] [colors frozen for rendering modes defined in .pymolrc]

2005-10-18 Thread Sebastien Moretti
But does this problem look like a bug ? No, it works as intended. The issue here is that the GUI just does not (yet) provide the capability of coloring representations, just atoms. So if you color representations directly using a command, then you'll need to use a command uncolor them.

Re: [PyMOL] [colors frozen for rendering modes defined in .pymolrc]

2005-10-17 Thread Sebastien Moretti
Sebastien, I cannot change the color for rendering modes I defined. I do not understand what you mean by this. Cheers, Warren I mean that the color, for cartoon view, is unchangeable when 'set cartoon_color' is defined in the $HOME/.pymolrc file. Thus, when I define 'set cartoon_color' in

[PyMOL] [colors frozen for rendering modes defined in .pymolrc]

2005-10-14 Thread Sebastien Moretti
Hello, I defined some default colors in the $HOME/.pymolrc file. E.g.: set cartoon_color, slate It works fine but in PyMOL viewer (version 0.98) I cannot change the color for rendering modes I defined. The one I defined is always kept. Is this a normal behavior ? Thanks -- Sébastien

Re: [PyMOL] test in pymol scripting language

2005-09-30 Thread Sebastien Moretti
Use Python blocks! Something like that: if (count_atoms nt) == 0 then cmd.delete(nt) if cmd.count_atoms(nt) == 0: \ cmd.delete(nt) Note the explicit use of continuation lines via backslashes. This ensures that PyMOL hands over both lines to the Python interpreter as a

[PyMOL] test in pymol scripting language

2005-09-29 Thread Sebastien Moretti
Hello, Is there a way to use test commands in pymol scripting language ? Something like that: if (count_atoms nt) == 0 then cmd.delete(nt) Thanks -- Sébastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex

Re: [PyMOL] comments ?

2005-08-04 Thread Sebastien Moretti
Yes -- this is a bug -- thanks for pointing it out. Cheers, Warren It seems that the 'print ...' commands is unrecognized in p1m files too. But, '#' doesn't work in p1m file. Error: unrecognized keyword: #second The # line involves an error but the script goes on. I think

Re: [PyMOL] comments ?

2005-08-04 Thread Sebastien Moretti
Just for the sake of the uninitiated What are .p1m files and how do they differ from regular .pml files. I took a quick look at Sebastians file and it looked pretty much like a regular .pml file to me. Cheers, .p1m files are web oriented. With them, you can embedded whole

Re: [PyMOL] comments ?

2005-08-02 Thread Sebastien Moretti
'#' seems to be incorrect: It is not incorrect. If you post your script and how you use it we might be able to help. Also, if you have something in you $HOME/.pymolrc or $HOME/.pymolrc.py you should try temporarily moving these files elsewhere and trying again. Something may have gone wrong

Re: [PyMOL] Name length in names panel

2005-08-01 Thread Sebastien Moretti
Hello Sebastien, Hello, Is there a way to expand the names panel to be able to read object and selection names larger than 16 characters ? At the bottom left corner of the panel, just to the left of the VCR controls is a little vertical bar. You can drag it to change the width of the

Re: [PyMOL] comments ?

2005-08-01 Thread Sebastien Moretti
I try to add comment lines in my pml scripts but I don't know how to do. I tried #, /*, //, !-- or -- characters but everything fails. use '#' but on a line of its own not at the end of line containing a pymol command, like this: # color 1DHS in red color red, 1DHS '#' seems to be

[PyMOL] Name length in names panel

2005-07-28 Thread Sebastien Moretti
Hello, Is there a way to expand the names panel to be able to read object and selection names larger than 16 characters ? Or, a way to show the full names when they are selected with the mouse ? Thanks -- Sébastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS 31 chemin Joseph Aiguier 13402

Re: [PyMOL] Mix pml script and PDB file

2005-07-19 Thread Sebastien Moretti
Sebastien, Yes, you can do with with a p1m file, which is like a pml file, but data can be included as well. Also note that p1m files are intended for web publishing, so embedded Python is disallowed. In p1m files, there is an embed command that enables this for PDB, MOL, MOL2, SDF, and

[PyMOL] Mix pml script and PDB file

2005-07-18 Thread Sebastien Moretti
Hello, Is there a way to get one file with pymol commands (pml script) and with the structure (PDB file) ? I can get this with Rasmol and the ras script file. Can I get the same kind of file with PyMOL ? Thanks -- Sébastien Moretti http://www.igs.cnrs-mrs.fr/ CNRS - IGS 31 chemin Joseph

[PyMOL] Segmentation fault when selection is too large

2005-07-13 Thread Sebastien Moretti
Hello, I use a script to build pml script file for PyMOL. Sometimes, the selection of individual residues are huge for PyMOL (0.98 or 0.97) and produces a segmentation fault. Is there a way to avoid this behavior ? Like a configuration file with a manageable memory quantity ? Thanks --

[PyMOL] multi-residues and -chains selection

2005-06-17 Thread Sebastien Moretti
Hello, I try to select several residues in several chains. I tried something like that : select selection, (resi 26+57+70 in chain a) and (resi 12 in chain d) but it fails. How can I Do ? thanks -- Sébastien Moretti http://igs.cnrs-mrs.fr/ CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille

Re: [PyMOL] multi-residues and -chains selection

2005-06-17 Thread Sebastien Moretti
select selection, (resi 26+57+70 in chain a) and (resi 12 in chain d) ^^^ You want 'or' not 'and'. (Think of a Venn diagram - with 'and' you are looking for residues which are in both chain a and chain d, which is impossible) Cheers, Charlie

Re: [PyMOL] Legend box

2005-05-09 Thread Sebastien Moretti
Dan Kulp wrote: I looked into this a little. I think the apbs script (its apbs.py or something -- if you can't find it search for it on google) calls a function called cmd.ramp_new() with a bunch of arguements. Apparently this 'ramp' is a built in c-level object. You maybe able to mimic the

[PyMOL] Re: default color

2005-03-17 Thread Sebastien Moretti
, slate' Windows users can do this with a pymolrc file. Thanks to Kristian Rother for his 'Tips for PyMOL' at http://www.rubor.de/bioinf/pymol_tips.html -- Sebastien Moretti CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex

[PyMOL] Convert Rasmol script to PyMOL

2005-03-15 Thread Sebastien Moretti
Hello, I would like to know if there is a simple way to convert Rasmol script to PyMOL. Thanks I use PyMOL 0.97 on Linux OS. Thanks -- Sebastien Moretti CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex

[PyMOL] default color

2005-03-10 Thread Sebastien Moretti
Hello, The setting menu doesn't seem to save the changes we do in it. So, I seek for the file where default color is coded, e.g. for cartoon, to save my changes. I use PyMOL 0.97 on Linux OS. Thanks -- Sebastien Moretti CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex