Re: [PyMOL] Saving the Connolly surface of a PDB

2011-04-08 Thread Francois Berenger
Jason Vertrees wrote:
> Hi Francios,
> 
> Someone recently asked about this and the answer was that this should
> be a setting, but isn't currently available.  If I have time, I'll try
> to sneak this in the upcoming PyMOL v1.4 release.

Is there a workaround for the moment?

For example, asking Pymol what is the current rotation
and translation the model being displayed has undergone
compared to the initial PDB that was read in?

With such a possibility, it would allow one to
know how to rigid body transform the input PDB
in order to have it aligned with the surface Pymol is
writing to a .obj file.

Thanks a lot,
Francois.

> Cheers,
> 
> -- Jason
> 
> On Fri, Feb 25, 2011 at 3:05 AM, Francois Berenger  wrote:
>> Hello,
>>
>> Is it possible to save the Connolly surface
>> computed by Pymol without any rotation and translation
>> added compared to the PDB from which the atom coordinates were read?
>>
>> I looked at the .obj file output and find there was some centering
>> done and also some rotation added.
>>
>> Thanks a lot,
>> F.
>>
>> --
>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
>> generated by your applications, servers and devices whether physical, virtual
>> or in the cloud. Deliver compliance at lower cost and gain new business
>> insights. http://p.sf.net/sfu/splunk-dev2dev
>> ___
>> 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
>>
> 
> 
> 


--
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


[PyMOL] global illumination, volume representation and ipython

2011-04-08 Thread Marius Retegan
Hello,

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?

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.
Also right clicking on the volume representation raises the following error

Error: 2
 Exception in Tk callback
  Function: > (type: )
  Args: (,)
  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
: unsupported operand type(s) for +: 'NoneType'
and 'int'

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]

Thanks
Marius
--
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

Re: [PyMOL] Saving the Connolly surface of a PDB

2011-04-08 Thread Tsjerk Wassenaar
Hi Francois,

That information is in the view matrix you get from get_view. The
first nine numbers are the rotation matrix R. The next three numbers
are the camera position c, followed by the three numbers denoting
origin of rotation o. Then to transform your protein coordinates, as
in the PDB, to match up with your output from pymol, for each
coordinate x, you do:

y = R %*% (x - o) + c

where %*% denotes matrix multiplication.

Hope it helps,

Tsjerk

On Fri, Apr 8, 2011 at 11:02 AM, Francois Berenger  wrote:
> Jason Vertrees wrote:
>> Hi Francios,
>>
>> Someone recently asked about this and the answer was that this should
>> be a setting, but isn't currently available.  If I have time, I'll try
>> to sneak this in the upcoming PyMOL v1.4 release.
>
> Is there a workaround for the moment?
>
> For example, asking Pymol what is the current rotation
> and translation the model being displayed has undergone
> compared to the initial PDB that was read in?
>
> With such a possibility, it would allow one to
> know how to rigid body transform the input PDB
> in order to have it aligned with the surface Pymol is
> writing to a .obj file.
>
> Thanks a lot,
> Francois.
>
>> Cheers,
>>
>> -- Jason
>>
>> On Fri, Feb 25, 2011 at 3:05 AM, Francois Berenger  wrote:
>>> Hello,
>>>
>>> Is it possible to save the Connolly surface
>>> computed by Pymol without any rotation and translation
>>> added compared to the PDB from which the atom coordinates were read?
>>>
>>> I looked at the .obj file output and find there was some centering
>>> done and also some rotation added.
>>>
>>> Thanks a lot,
>>> F.
>>>
>>> --
>>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>>> Real-Time with Splunk. Collect, index and harness all the fast moving IT 
>>> data
>>> generated by your applications, servers and devices whether physical, 
>>> virtual
>>> or in the cloud. Deliver compliance at lower cost and gain new business
>>> insights. http://p.sf.net/sfu/splunk-dev2dev
>>> ___
>>> 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
>>>
>>
>>
>>
>
>
> --
> 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
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
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


[PyMOL] Display coordinate vectors

2011-04-08 Thread Martin Hediger
Dear all
I'm sure this question was answered before, but I could not find 
anything related to it in neither the mail list nor on the Wiki.
Is it possible to display something like coordinate vectors in PyMOL? 
I.e. arrows in the 3d view space pointing towards [1,0,0], [0,1,0] and 
[0,0,1]?

I would like to illustrate the alignment of the principal axes of a 
protein with the coordinate system.

Kind regards and thank you for answers.
Martin Hediger

--
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


Re: [PyMOL] Display coordinate vectors

2011-04-08 Thread Hongbo Zhu
Hi, Martin,

how about this:
http://www.pymolwiki.org/index.php/Symmetry_Axis

also check out the script drawing X, Y, and Z reference axes by Robert:
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/axes_cyl.py

hope it helps,
hongbo

On 04/08/2011 04:29 PM, Martin Hediger wrote:
> Dear all
> I'm sure this question was answered before, but I could not find
> anything related to it in neither the mail list nor on the Wiki.
> Is it possible to display something like coordinate vectors in PyMOL?
> I.e. arrows in the 3d view space pointing towards [1,0,0], [0,1,0] and
> [0,0,1]?
>
> I would like to illustrate the alignment of the principal axes of a
> protein with the coordinate system.
>
> Kind regards and thank you for answers.
> Martin Hediger
>
> --
> 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

--
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


Re: [PyMOL] Display coordinate vectors

2011-04-08 Thread Martin Hediger
great, thanks.

On 08.04.11 16:42, Hongbo Zhu wrote:
> Hi, Martin,
>
> how about this:
> http://www.pymolwiki.org/index.php/Symmetry_Axis
>
> also check out the script drawing X, Y, and Z reference axes by Robert:
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/axes_cyl.py
>
> hope it helps,
> hongbo
>
> On 04/08/2011 04:29 PM, Martin Hediger wrote:
>> Dear all
>> I'm sure this question was answered before, but I could not find
>> anything related to it in neither the mail list nor on the Wiki.
>> Is it possible to display something like coordinate vectors in PyMOL?
>> I.e. arrows in the 3d view space pointing towards [1,0,0], [0,1,0] and
>> [0,0,1]?
>>
>> I would like to illustrate the alignment of the principal axes of a
>> protein with the coordinate system.
>>
>> Kind regards and thank you for answers.
>> Martin Hediger
>>
>> --
>> 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
> --
> 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
>

--
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


Re: [PyMOL] global illumination, volume representation and ipython

2011-04-08 Thread Jason Vertrees
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
>  Exception in Tk callback
>   Function:  > (type:  'instancemethod'>)
>   Args: (,)
>   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
> : 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


[PyMOL] Convert pml script to Pymol Python script

2011-04-08 Thread Matthias Schmidt
Hi,

I have a few pml scripts for pymol that I would like to rewrite
properly in python, making use of Pymol's ability to interprete Python
scripts.

Do you know of an interpreter that converts pml scripts automatically
to python scripts for Pymol? Since the number of tasks that you can do
in pml is finite, this should be possible, or not?

Best,

Matthias

-- 
Structural Bioinformatics and Computational Biochemistry Unit
Dept. of Biochemistry
University of Oxford
South Parks Road
Oxford
OX1 3QU
U.K.

Telephone: 01865 613304
Fax: 01865 613238

--
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


Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-08 Thread Jason Vertrees
Hi Matthias,

There is no script that I'm aware of, but writing one should be rather
straightforward because of how the API is organized:

commandName arg1, arg2, arg3

becomes

cmd.commandName(arg1, arg2, arg3)

The hardest part would be determining when to quote strings versus not
quoting numbers and variables.  You might be able to reflect against
the API for a more robust script
(http://diveintopython.org/power_of_introspection/index.html).  Java's
great at that, not sure about Python.  Good luck.

Cheers,

-- Jason


On Fri, Apr 8, 2011 at 1:01 PM, Matthias Schmidt
 wrote:
> Hi,
>
> I have a few pml scripts for pymol that I would like to rewrite
> properly in python, making use of Pymol's ability to interprete Python
> scripts.
>
> Do you know of an interpreter that converts pml scripts automatically
> to python scripts for Pymol? Since the number of tasks that you can do
> in pml is finite, this should be possible, or not?
>
> Best,
>
> Matthias
>
> --
> Structural Bioinformatics and Computational Biochemistry Unit
> Dept. of Biochemistry
> University of Oxford
> South Parks Road
> Oxford
> OX1 3QU
> U.K.
>
> Telephone: 01865 613304
> Fax: 01865 613238
>
> --
> 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
>



-- 
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


Re: [PyMOL] Convert pml script to Pymol Python script

2011-04-08 Thread Michael Lerner
It's not elegant at all, but it's worth knowing that you can use
cmd.do("...") as a quick fix for lines that aren't immediately easy to
convert.

Even a mostly-working pml2py tool would be a useful addition to the wiki.

Cheers,

-Michael

On Fri, Apr 8, 2011 at 2:09 PM, Jason Vertrees <
jason.vertr...@schrodinger.com> wrote:

> Hi Matthias,
>
> There is no script that I'm aware of, but writing one should be rather
> straightforward because of how the API is organized:
>
> commandName arg1, arg2, arg3
>
> becomes
>
> cmd.commandName(arg1, arg2, arg3)
>
> The hardest part would be determining when to quote strings versus not
> quoting numbers and variables.  You might be able to reflect against
> the API for a more robust script
> (http://diveintopython.org/power_of_introspection/index.html).  Java's
> great at that, not sure about Python.  Good luck.
>
> Cheers,
>
> -- Jason
>
>
> On Fri, Apr 8, 2011 at 1:01 PM, Matthias Schmidt
>  wrote:
> > Hi,
> >
> > I have a few pml scripts for pymol that I would like to rewrite
> > properly in python, making use of Pymol's ability to interprete Python
> > scripts.
> >
> > Do you know of an interpreter that converts pml scripts automatically
> > to python scripts for Pymol? Since the number of tasks that you can do
> > in pml is finite, this should be possible, or not?
> >
> > Best,
> >
> > Matthias
> >
> > --
> > Structural Bioinformatics and Computational Biochemistry Unit
> > Dept. of Biochemistry
> > University of Oxford
> > South Parks Road
> > Oxford
> > OX1 3QU
> > U.K.
> >
> > Telephone: 01865 613304
> > Fax: 01865 613238
> >
> >
> --
> > 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
> >
>
>
>
> --
> 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
>



-- 
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)
--
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

Re: [PyMOL] global illumination, volume representation and ipython

2011-04-08 Thread Marius Retegan
Hello,

On Fri, Apr 8, 2011 at 6:49 PM, Jason Vertrees <
jason.vertr...@schrodinger.com> wrote:

> 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.
>
>
>
I knew about the solution from the wiki, but as you mentioned there are
better ways to do this :).


>
> > 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).
>

I'm going to give that a try. Maybe if I find some time I'm going to write
the volume class closer to my need and post somewhere the code. For this I
would really like to be able to see what gets passed thru it interactively
(the reason why I've asked about iPyton).


>
> > Also right clicking on the volume representation raises the following
> error
> >
> > Error: 2
> >  Exception in Tk callback
> >   Function:  > > (type:
>  > 'instancemethod'>)
> >   Args: (,)
> >   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
> > : 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]
>
>
> This is what I get in iPython

In [4]: cube = pymol.cmd.load("my_cube.cube")
---
AttributeErrorTraceback (most recent call last)

/home/marius/ in ()

/usr/lib64/python2.7/site-packages/pymol/importing.pyc in load(filename,
object, state, format, finish, discrete, quiet, multiplex, zoom, partial,
mimic, _self)
870
discrete,quiet,multiplex,zoom,mimic,_self=_self)
871 finally:
--> 872 _self.unlock(r,_self)
873 if go_to_first_scene:
874 if
int(_self.get_setting_legacy("presentation_au