From: Ricardo O. S. S. <rs...@fc...> - 2014-01-14 18:58:35
|
Hello everyone, I wrote a python script where pymol performs some color changes, ray tracing and image export. The script works perfectly if I enable the GUI, however if I load pymol without the GUI (-c flag) I receive a segmentation fault error. I found out that this issue is resolved by commenting the line "pymol.cmd.ray(640,640,300,-1)". I'd like to solve this, so the script can run in a loop without opening the GUI every time. It may help to clarify that I'm running a LinuxMint14 machine (AMD64), with GCC compiler version 4.7.2. I appreciate any help. Ricardo. --- Biological Chemistry and Physics Faculty of Pharmaceutical Sciences at Ribeirão Preto University of São Paulo - Brazil |
From: Thomas H. <tho...@sc...> - 2014-01-14 20:44:02
|
Hi Ricardo, you probably want to do this, without calling the ray command: cmd.png("image.png", 640, 640, dpi=300, ray=1) Also, your ray command sets antialias=300 and angle=-1, which I guess was not your intention. I'm not getting a segmentation fault with the latest SVN code using your command, though. Do you have any volume representation? Volume is not fully supported with ray tracing. Cheers, Thomas On 14 Jan 2014, at 13:36, Ricardo O. S. Soares <rs...@fc...> wrote: > Hello everyone, > > I wrote a python script where pymol performs some color changes, ray tracing and image export. > The script works perfectly if I enable the GUI, however if I load pymol without the GUI (-c flag) I receive a segmentation fault error. > I found out that this issue is resolved by commenting the line "pymol.cmd.ray(640,640,300,-1)". > I'd like to solve this, so the script can run in a loop without opening the GUI every time. > It may help to clarify that I'm running a LinuxMint14 machine (AMD64), with GCC compiler version 4.7.2. > > I appreciate any help. > > Ricardo. > --- > Biological Chemistry and Physics > Faculty of Pharmaceutical Sciences at Ribeirão Preto > University of São Paulo - Brazil -- Thomas Holder PyMOL Developer |
From: Ricardo O. S. S. <rs...@fc...> - 2014-01-15 18:49:02
|
Hello Thomas, thanks for your reply. You are right, I unintentionally switched the antialias and angle parameters, sorry about that. But that does not change mush the outcome, any cmd.ray gives me the segmentation fault. I'm getting no output from cmd.png unless I use the ray command first (which works fine only with loaded GUI), and that seems to be a rather common issue in GUI-less mode (http://pymolwiki.org/index.php/Png). You said you weren't getting a seg. fault with the latest SVN code, did you ran it GUI-less? The representations I'm using are surfaces, however I get the same error with any of them, and in different machines. Here's a example of script that gives me the error: import __main__ #__main__.pymol_argv = [ 'pymol', '-qc'] # Quiet and no GUI __main__.pymol_argv = [ 'pymol', '-q' ] import pymol, time pymol.finish_launching() pymol.cmd.load("temp.pdb") pymol.cmd.ray() -----> this line gives segmentation fault pymol.cmd.png("image.png", 640, 640, 300,1) -----> this wont work without loaded GUI pymol.cmd.quit() Cheers, Ricardo. --- Biological Chemistry and Physics Faculty of Pharmaceutical Sciences at Ribeirão Preto University of São Paulo - Brazil ----- Mensagem original ----- > De: "Thomas Holder" <tho...@sc...> > Para: "Ricardo O. S. Soares" <rs...@fc...> > Cc: "pymol-users" <pym...@li...> > Enviadas: Terça-feira, 14 de Janeiro de 2014 18:18:37 > Assunto: Re: [PyMOL] Ray tracing with no GUI yields segmentation > fault > Hi Ricardo, > you probably want to do this, without calling the ray command: > cmd.png("image.png", 640, 640, dpi=300, ray=1) > Also, your ray command sets antialias=300 and angle=-1, which I guess > was not your intention. I'm not getting a segmentation fault with > the latest SVN code using your command, though. Do you have any > volume representation? Volume is not fully supported with ray > tracing. > Cheers, > Thomas > On 14 Jan 2014, at 13:36, Ricardo O. S. Soares <rs...@fc...> > wrote: > > Hello everyone, > > > > I wrote a python script where pymol performs some color changes, > > ray tracing and image export. > > The script works perfectly if I enable the GUI, however if I load > > pymol without the GUI (-c flag) I receive a segmentation fault > > error. > > I found out that this issue is resolved by commenting the line > > "pymol.cmd.ray(640,640,300,-1)". > > I'd like to solve this, so the script can run in a loop without > > opening the GUI every time. > > It may help to clarify that I'm running a LinuxMint14 machine > > (AMD64), with GCC compiler version 4.7.2. > > > > I appreciate any help. > > > > Ricardo. > > --- > > Biological Chemistry and Physics > > Faculty of Pharmaceutical Sciences at Ribeirão Preto > > University of São Paulo - Brazil > -- > Thomas Holder > PyMOL Developer |
From: Thomas H. <tho...@sc...> - 2014-01-15 19:32:10
|
Hi Ricardo, you didn't mention that you launch pymol from a script (with "finish_launching"), which is not very well supported. The recommended mode for GUI-less scripts is to run pymol like that: pymol -cqr yourscript.py Cheers, Thomas On 15 Jan 2014, at 13:48, Ricardo O. S. Soares <rs...@fc...> wrote: > Hello Thomas, > thanks for your reply. > > You are right, I unintentionally switched the antialias and angle parameters, sorry about that. > But that does not change mush the outcome, any cmd.ray gives me the segmentation fault. > I'm getting no output from cmd.png unless I use the ray command first (which works fine only with loaded GUI), and that seems to be a rather common issue in GUI-less mode (http://pymolwiki.org/index.php/Png). > You said you weren't getting a seg. fault with the latest SVN code, did you ran it GUI-less? > The representations I'm using are surfaces, however I get the same error with any of them, and in different machines. > > Here's a example of script that gives me the error: > > import __main__ > #__main__.pymol_argv = [ 'pymol', '-qc'] # Quiet and no GUI > __main__.pymol_argv = [ 'pymol', '-q' ] > import pymol, time > > pymol.finish_launching() > pymol.cmd.load("temp.pdb") > pymol.cmd.ray() -----> this line gives segmentation fault > pymol.cmd.png("image.png", 640, 640, 300,1) -----> this wont work without loaded GUI > > pymol.cmd.quit() > > Cheers, > > Ricardo. > > --- > Biological Chemistry and Physics > Faculty of Pharmaceutical Sciences at Ribeirão Preto > University of São Paulo - Brazil > De: "Thomas Holder" <tho...@sc...> > Para: "Ricardo O. S. Soares" <rs...@fc...> > Cc: "pymol-users" <pym...@li...> > Enviadas: Terça-feira, 14 de Janeiro de 2014 18:18:37 > Assunto: Re: [PyMOL] Ray tracing with no GUI yields segmentation fault > > Hi Ricardo, > > you probably want to do this, without calling the ray command: > > cmd.png("image.png", 640, 640, dpi=300, ray=1) > > Also, your ray command sets antialias=300 and angle=-1, which I guess was not your intention. I'm not getting a segmentation fault with the latest SVN code using your command, though. Do you have any volume representation? Volume is not fully supported with ray tracing. > > Cheers, > Thomas > > On 14 Jan 2014, at 13:36, Ricardo O. S. Soares <rs...@fc...> wrote: > > > Hello everyone, > > > > I wrote a python script where pymol performs some color changes, ray tracing and image export. > > The script works perfectly if I enable the GUI, however if I load pymol without the GUI (-c flag) I receive a segmentation fault error. > > I found out that this issue is resolved by commenting the line "pymol.cmd.ray(640,640,300,-1)". > > I'd like to solve this, so the script can run in a loop without opening the GUI every time. > > It may help to clarify that I'm running a LinuxMint14 machine (AMD64), with GCC compiler version 4.7.2. > > > > I appreciate any help. > > > > Ricardo. > > --- > > Biological Chemistry and Physics > > Faculty of Pharmaceutical Sciences at Ribeirão Preto > > University of São Paulo - Brazil > > -- > Thomas Holder > PyMOL Developer -- Thomas Holder PyMOL Developer |
From: Ricardo O. S. S. <rs...@fc...> - 2014-01-15 20:24:48
|
Hello Thomas , you're right, now everything runs smoothly. Thanks for your help! Best regards, Ricardo. --- Biological Chemistry and Physics Faculty of Pharmaceutical Sciences at Ribeirão Preto University of São Paulo - Brazil ----- Mensagem original ----- > De: "Thomas Holder" <tho...@sc...> > Para: "Ricardo O. S. Soares" <rs...@fc...> > Cc: "pymol-users" <pym...@li...> > Enviadas: Quarta-feira, 15 de Janeiro de 2014 17:32:00 > Assunto: Re: [PyMOL] Ray tracing with no GUI yields segmentation > fault > Hi Ricardo, > you didn't mention that you launch pymol from a script (with > "finish_launching"), which is not very well supported. The > recommended mode for GUI-less scripts is to run pymol like that: > pymol -cqr yourscript.py > Cheers, > Thomas > On 15 Jan 2014, at 13:48, Ricardo O. S. Soares <rs...@fc...> > wrote: > > Hello Thomas, > > thanks for your reply. > > > > You are right, I unintentionally switched the antialias and angle > > parameters, sorry about that. > > But that does not change mush the outcome, any cmd.ray gives me the > > segmentation fault. > > I'm getting no output from cmd.png unless I use the ray command > > first (which works fine only with loaded GUI), and that seems to > > be a rather common issue in GUI-less mode > > (http://pymolwiki.org/index.php/Png). > > You said you weren't getting a seg. fault with the latest SVN code, > > did you ran it GUI-less? > > The representations I'm using are surfaces, however I get the same > > error with any of them, and in different machines. > > > > Here's a example of script that gives me the error: > > > > import __main__ > > #__main__.pymol_argv = [ 'pymol', '-qc'] # Quiet and no GUI > > __main__.pymol_argv = [ 'pymol', '-q' ] > > import pymol, time > > > > pymol.finish_launching() > > pymol.cmd.load("temp.pdb") > > pymol.cmd.ray() -----> this line gives segmentation fault > > pymol.cmd.png("image.png", 640, 640, 300,1) -----> this wont work > > without loaded GUI > > > > pymol.cmd.quit() > > > > Cheers, > > > > Ricardo. > > > > --- > > Biological Chemistry and Physics > > Faculty of Pharmaceutical Sciences at Ribeirão Preto > > University of São Paulo - Brazil > > De: "Thomas Holder" <tho...@sc...> > > Para: "Ricardo O. S. Soares" <rs...@fc...> > > Cc: "pymol-users" <pym...@li...> > > Enviadas: Terça-feira, 14 de Janeiro de 2014 18:18:37 > > Assunto: Re: [PyMOL] Ray tracing with no GUI yields segmentation > > fault > > > > Hi Ricardo, > > > > you probably want to do this, without calling the ray command: > > > > cmd.png("image.png", 640, 640, dpi=300, ray=1) > > > > Also, your ray command sets antialias=300 and angle=-1, which I > > guess was not your intention. I'm not getting a segmentation fault > > with the latest SVN code using your command, though. Do you have > > any volume representation? Volume is not fully supported with ray > > tracing. > > > > Cheers, > > Thomas > > > > On 14 Jan 2014, at 13:36, Ricardo O. S. Soares > > <rs...@fc...> wrote: > > > > > Hello everyone, > > > > > > I wrote a python script where pymol performs some color changes, > > > ray tracing and image export. > > > The script works perfectly if I enable the GUI, however if I load > > > pymol without the GUI (-c flag) I receive a segmentation fault > > > error. > > > I found out that this issue is resolved by commenting the line > > > "pymol.cmd.ray(640,640,300,-1)". > > > I'd like to solve this, so the script can run in a loop without > > > opening the GUI every time. > > > It may help to clarify that I'm running a LinuxMint14 machine > > > (AMD64), with GCC compiler version 4.7.2. > > > > > > I appreciate any help. > > > > > > Ricardo. > > > --- > > > Biological Chemistry and Physics > > > Faculty of Pharmaceutical Sciences at Ribeirão Preto > > > University of São Paulo - Brazil > > > > -- > > Thomas Holder > > PyMOL Developer > -- > Thomas Holder > PyMOL Developer |