Hi Marius,

> There's been quite a while since I wanted to ask this on the list, but would
> it be possible to have in Pymol some kind of technique to emulate realistic
> lighting (global illumination) in a rendered scene?

So, you're looking for something like ambient occlusion?  If so, try
this (taken from the gallery at the PyMOLWiki):

load $TUT/1hpv.pdb
set_color oxygen, [1.0,0.4,0.4]
set_color nitrogen, [0.5,0.5,1.0]
remove solvent
as spheres
util.cbaw
bg white
set light_count,10
set spec_count,1
set shininess, 10
set specular, 0.25
set ambient,0
set direct,0
set reflect,1.5
set ray_shadow_decay_factor, 0.1
set ray_shadow_decay_range, 2
unset depth_cue
ray

PyMOL can simulate this, but not do it numerically perfectly.  With
the addition of shaders and us working on modernizing the code, this
might be properly doable in the future.



> The next point is related to the new volume representation. For example
> after loading a cube file which contains the electrostatic potential of a
> small molecule, Pymol does not show the whole range in the volume
> representation. My data spans from -0.08 to 172.6.  I haven't looked at how
> that scale is build, but would it be possible to let the user specify the
> range and build intermediate values from that. Also, while I understand that
> this feature was especially developed for the representation of electron
> density maps for proteins, not everyone is doing that and standard deviation
> or histograms on the volume representation should not be there by default. A
> simple scale should suffice.

Thanks for trying this out and offering your feedback.  Currently, the
vast majority of volumes users are crystallographers with very well
defined ranges for data.  We tried to make the common case easy for
them, while still allowing not-common use cases possible.  We do plan
to improve the UI in the future.  Context aside, here's your fix:

set volume_data_range, X

where X is the number (or fraction) of +/- sigma-levels PyMOL should
map out on the X axis.  The default is 5.  After you change this
value, please reload the Volume editor, by clicking on the "Volume"
button (twice).  For your data if you need to hit 30 "sigma levels" to
get to 172.6, then set volume_data_range to 30.  Again, this was for
statistically normalized crystallographic data and your data may not
be normal and thus not have "sigma" levels with meaning.  In that
case, just try the numbers and see what works for you.  You can also
use fractional values to focus on a narrow portion of the data (around
the mean).

> Also right clicking on the volume representation raises the following error
>
> Error: 2
> <type 'exceptions.TypeError'> Exception in Tk callback
>   Function: <bound method Volume.editPoint of
> <pmg_tk.skins.normal.volume.Volume instance at 0x2aaaac556b90>> (type: <type
> 'instancemethod'>)
>   Args: (<Tkinter.Event instance at 0x2aaaac7277a0>,)
>   Event type: ButtonPress (type num: 4)
> Traceback (innermost last):
>   File "/usr/lib/python2.7/site-packages/Pmw/Pmw_1_3/lib/PmwBase.py", line
> 1747, in __call__
>     return apply(self.func, args)
>   File "/usr/lib64/python2.7/site-packages/pmg_tk/skins/normal/volume.py",
> line 369, in editPoint
>     event.x = self.active_ramp.getPoint(pt) + self.padX
> <type 'exceptions.TypeError'>: unsupported operand type(s) for +: 'NoneType'
> and 'int'

This is a bug.  We'll fix this.  In the meantime, please right-click
closer to color points.  Right-clicking a point will allow you to edit
it.  Right-clicking the background will bring up that exception.  You
can delete points with the middle mouse button.


> Finally is it possible to use Pymol from within iPython? For example I
> wanted recently to see the properties of a C object. That would have been
> extremly easy in iPython
>
> import pymol
> cube = pymol.cmd.load("my.cube")
> cube.[TAB] [TAB]


I think it should be, but I haven't tried.  iPython will have to use
the same Python that you used to build PyMOL.

Cheers,

-- Jason

-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
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

Reply via email to