Re: [PyMOL] problem with ray of PNG using pymol in non-gui mode

2022-01-20 Thread Saurabh Gayali
Have you tried setting ray_trace_mode?
Info here: https://pymolwiki.org/index.php/Ray

--

*Saurabh Gayali* / Post Doctoral Fellow
saurabh.gay...@gmail.com / +91 8800412916

*CSIR-IGIB*
New Delhi, India


[image: Mailtrack]

Sender
notified by
Mailtrack

21/01/22,
10:10:28 am

On Thu, Jan 20, 2022 at 11:02 PM Enrico Martinez 
wrote:

> Dear Pymol Users!
> I've faced the problem of saving a PNG image without ray using the png
> command in non-gui mode. First if I do it in pymol gui
> #cmd.png('test.png',width=800,height=800,ray=0)
> .. it produces fine image (without ray)
>
> However if I execute the same command inside of my bash sript:
>
> $pymol -c -d "
> from pymol import cmd
> from pymol import preset
> cmd.load('my_pdb.pdb')
> cmd.show('surface', 'my_pdb and polymer')
> cmd.set('surface_color', 'default', 'my_pdb and polymer')
> cmd.set('transparency', '0.8', 'my_pdb and polymer')
> cmd.save('${vizu}/${output}_${lig_name}_rep${i}.pse')
>
> cmd.png('${vizu}/${output}_${lig_name}_interact_rep${i}.png',width=${image},height=${image},ray=0)
> "
>
> Eventually It produces the correct pymol session but on the PNG image
> I do not see any cartoon representation (only transparent surface) of
> my protein. I did some tests and found that using non-gui mode (like
> in the script shown above) pymol always sets the ray flag to ray=1
> even if it is disabled in my script. Is there any way to disable ray
> (ray=0) in my script besides setting it in the cmd.png?
> Many thanks in advance!
> Enrico
>
>
> ___
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
>
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] problem with ray of PNG using pymol in non-gui mode

2022-01-20 Thread Enrico Martinez
Dear Pymol Users!
I've faced the problem of saving a PNG image without ray using the png
command in non-gui mode. First if I do it in pymol gui
#cmd.png('test.png',width=800,height=800,ray=0)
.. it produces fine image (without ray)

However if I execute the same command inside of my bash sript:

$pymol -c -d "
from pymol import cmd
from pymol import preset
cmd.load('my_pdb.pdb')
cmd.show('surface', 'my_pdb and polymer')
cmd.set('surface_color', 'default', 'my_pdb and polymer')
cmd.set('transparency', '0.8', 'my_pdb and polymer')
cmd.save('${vizu}/${output}_${lig_name}_rep${i}.pse')
cmd.png('${vizu}/${output}_${lig_name}_interact_rep${i}.png',width=${image},height=${image},ray=0)
"

Eventually It produces the correct pymol session but on the PNG image
I do not see any cartoon representation (only transparent surface) of
my protein. I did some tests and found that using non-gui mode (like
in the script shown above) pymol always sets the ray flag to ray=1
even if it is disabled in my script. Is there any way to disable ray
(ray=0) in my script besides setting it in the cmd.png?
Many thanks in advance!
Enrico


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


[PyMOL] ball-and-stick representatation of the ligand and non-polar contacts

2022-01-20 Thread Enrico Martinez
I am using the combination of two presets to visualise protein-ligand
interactions:

1) to visualise protein-ligand contacts
preset.ligand_cartoon('${output}*',_self=cmd)

2) and then to change the representation of the ligand:
preset.ball_and_stick(selection='my_system and not polymer', mode=1)

Unfortunately after the execution of the second command I do not see
anymore dashed yellow lines for non-polar contacts between protein and
ligand
Is there any quick command, which may return it for a multi-model file
and better to change the color of the dotted line from yellow
(default) to another color (blue)?
Thank you in advance!
Enrico


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


[PyMOL] How may I color surface using spectral palette ?

2022-01-20 Thread Enrico Martinez
Dear All,
I am working on the visualization of the transparent surface in my
model. For the moment I found only one possibility for non-monotone
coloring palette of the surface, using
cmd.set('surface_color', 'default')
How may I color the surface using some spectrum (e.g. from orange to
yellow) or alternatively according to the electrostatic properties of
the amino-acids?
Thank you in advance
Enrico


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe