[PyMOL] Smooth fading of surface in movie?

2009-09-01 Thread Dirk Kostrewa

Dear Warren,

using PyMOL without any additional plug-ins, like slerpy or eMovie,  
is it possible to fade in or out a surface of, say, a ligand, between  
scenes?


Best regards,

Dirk.

***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:  +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail: kostr...@genzentrum.lmu.de
WWW:www.genzentrum.lmu.de
***

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] Smooth fading of surface in movie?

2009-09-01 Thread Dirk Kostrewa

Dear Carsten,

yes, thanks. However, for a smooth fading, that would require a lot of  
scenes. Is there a simple python loop, that would create scenes with  
smooth transparency fading-in from 0 to 1 and that I could use in my  
pymol-scripts? Unfortunately, I'm not familiar with python, yet ...


Best regards,

Dirk.

Am 01.09.2009 um 15:39 schrieb Schubert, Carsten [PRDUS]:


Dirk,

you could try playing around with different transparency settings in  
subsequent scenes to emulate the effect.


HTH

Carsten

From: Dirk Kostrewa [mailto:kostr...@genzentrum.lmu.de]
Sent: Tuesday, September 01, 2009 8:57 AM
To: PyMOLBB
Subject: [PyMOL] Smooth fading of surface in movie?

Dear Warren,

using PyMOL without any additional plug-ins, like slerpy or  
eMovie, is it possible to fade in or out a surface of, say, a  
ligand, between scenes?


Best regards,

Dirk.

***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:   +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail:kostr...@genzentrum.lmu.de
WWW:www.genzentrum.lmu.de
***





***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:  +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail: kostr...@genzentrum.lmu.de
WWW:www.genzentrum.lmu.de
***

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] Smooth fading of surface in movie?

2009-09-01 Thread Anastassis Perrakis
A silly but working solution is to embed the pymol script in a csh  
script which changes the value for the transparency in small steps.


Not ellegant but if you know csh/sh/bash it's easy.

A.

Sent from my iPhone

On 1 Sep 2009, at 16:23, Schubert, Carsten [PRDUS] cschu...@its.jnj.com 
 wrote:


That would require execution of a python program within a specific  
scene, which is not supported as far as I know. Scenes are intended  
to be static representations of display states, for lack of a better  
word. You would need to manually run the fade script before  
transitioning the scene. Not sure if this is what you want. Looks as  
if you may be better off plunging into movies if you really need the  
effect.




Mark Lutz, David Asher , Learning Python, o’Reilly  Great book i 
f you want to dive into python.




Cheers,



Carsten



From: Dirk Kostrewa [mailto:kostr...@genzentrum.lmu.de]
Sent: Tuesday, September 01, 2009 9:56 AM
To: PyMOLBB
Subject: Re: [PyMOL] Smooth fading of surface in movie?



Dear Carsten,



yes, thanks. However, for a smooth fading, that would require a lot  
of scenes. Is there a simple python loop, that would create scenes  
with smooth transparency fading-in from 0 to 1 and that I could use  
in my pymol-scripts? Unfortunately, I'm not familiar with python,  
yet ...




Best regards,



Dirk.



Am 01.09.2009 um 15:39 schrieb Schubert, Carsten [PRDUS]:




Dirk,



you could try playing around with different transparency settings in  
subsequent scenes to emulate the effect.




HTH



Carsten



From: Dirk Kostrewa [mailto:kostr...@genzentrum.lmu.de]
Sent: Tuesday, September 01, 2009 8:57 AM
To: PyMOLBB
Subject: [PyMOL] Smooth fading of surface in movie?



Dear Warren,



using PyMOL without any additional plug-ins, like slerpy or  
eMovie, is it possible to fade in or out a surface of, say, a  
ligand, between scenes?




Best regards,



Dirk.


***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:   +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail:kostr...@genzentrum.lmu.de
WWW:www.genzentrum.lmu.de
***








***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:   +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail:kostr...@genzentrum.lmu.de
WWW:www.genzentrum.lmu.de
***




--- 
--- 
--- 
-
Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
30-Day
trial. Simplify your report design, integration and deployment - and  
focus on

what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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- 
us...@lists.sourceforge.net
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] Smooth fading of surface in movie?

2009-09-01 Thread Schubert, Carsten [PRDUS]
Dirk,

 

you could try playing around with different transparency settings in
subsequent scenes to emulate the effect. 

 

HTH 

 

Carsten

 

From: Dirk Kostrewa [mailto:kostr...@genzentrum.lmu.de] 
Sent: Tuesday, September 01, 2009 8:57 AM
To: PyMOLBB
Subject: [PyMOL] Smooth fading of surface in movie?

 

Dear Warren,

 

using PyMOL without any additional plug-ins, like slerpy or eMovie, is
it possible to fade in or out a surface of, say, a ligand, between
scenes?

 

Best regards,

 

Dirk.


***
Dirk Kostrewa
Gene Center, A 5.07
Ludwig-Maximilians-University
Feodor-Lynen-Str. 25
81377 Munich
Germany
Phone:   +49-89-2180-76845
Fax:+49-89-2180-76999
E-mail:kostr...@genzentrum.lmu.de
mailto:kostr...@lmb.uni-muenchen.de 
WWW:www.genzentrum.lmu.de
mailto:kostr...@lmb.uni-muenchen.de 
***



 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
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] Smooth fading of surface in movie?

2009-09-01 Thread Matthew D. Hogg
I use a clunky set of mdo commands to do this.

mdo 266: set transparency, .1, (palm+linker+Nterm)
mdo 267: set transparency, .2, (palm+linker+Nterm)
mdo 268: set transparency, .3, (palm+linker+Nterm)
mdo 269: set transparency, .4, (palm+linker+Nterm)
mdo 270: set transparency, .5, (palm+linker+Nterm)
mdo 271: set transparency, .6, (palm+linker+Nterm)
mdo 272: set transparency, .7, (palm+linker+Nterm)
mdo 273: set transparency, .8, (palm+linker+Nterm)
mdo 274: set transparency, .9, (palm+linker+Nterm)
mdo 275: set transparency, 1, (palm+linker+Nterm)

If the surfaces are turned on for objects palm, linker and Nterm, then  
this will fade out the surface over frames 266 to 275. Setting the  
transparency to 1 and then reversing the order of the values will make  
the surface fade in.

HTH

Matthew Hogg
University of Vermont
Burlington, VT 05405


Quoting Dirk Kostrewa kostr...@genzentrum.lmu.de:

 Dear Warren,

 using PyMOL without any additional plug-ins, like slerpy or eMovie,
 is it possible to fade in or out a surface of, say, a ligand, between
 scenes?

 Best regards,

 Dirk.

 ***
 Dirk Kostrewa
 Gene Center, A 5.07
 Ludwig-Maximilians-University
 Feodor-Lynen-Str. 25
 81377 Munich
 Germany
 Phone:+49-89-2180-76845
 Fax:  +49-89-2180-76999
 E-mail:   kostr...@genzentrum.lmu.de
 WWW:  www.genzentrum.lmu.de
 ***




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Smooth fading of surface in movie?

2009-09-01 Thread Tsjerk Wassenaar
Hi :)

Some people are just not lazy enough ;) Lazy people like me spend a
good deal of effort thinking about how to avoid efforts like writing
repetitive lines :p And then you could come up with:

from math import sin,pi
mset 1 x300
for i in range(200,301): cmd.mdo( i, set transparency,selection,%f %
( math.sin( math.pi*(i-200)/(2*100) ) ) )

The fuzz with the sine is of course to have a smoother fade. One could
also take the simpler linear fade, but mind that the either numerator
or divisor (or both) have to be float in order to end up with a float:

for i in range(200,301): cmd.mdo( i, set transparency,selection,%f %
( (i-200)/100.0 ) )

With a bit more scripting, you can easily use this to define functions
for fading properties from one value to another over a given range of
frames.

As a side note, if the fade is part of a more complex movie, hide the
surface one frame after the fade has completed. Possibly it's also
best to explicitly show it again in the first frame, in case you have
Pymol cycle through the movie. In case the purpose is fading in the
surface, start with surface view hidden and turn on the surface the
frame before you start the fade. This way you avoid Pymol calculating
its way through a null surface, possibly even coming up with some
artefacts...

Hope it helps,

Tsjerk


On Tue, Sep 1, 2009 at 5:01 PM, Matthew D. Hoggmh...@uvm.edu wrote:
 I use a clunky set of mdo commands to do this.

 mdo 266: set transparency, .1, (palm+linker+Nterm)
 mdo 267: set transparency, .2, (palm+linker+Nterm)
 mdo 268: set transparency, .3, (palm+linker+Nterm)
 mdo 269: set transparency, .4, (palm+linker+Nterm)
 mdo 270: set transparency, .5, (palm+linker+Nterm)
 mdo 271: set transparency, .6, (palm+linker+Nterm)
 mdo 272: set transparency, .7, (palm+linker+Nterm)
 mdo 273: set transparency, .8, (palm+linker+Nterm)
 mdo 274: set transparency, .9, (palm+linker+Nterm)
 mdo 275: set transparency, 1, (palm+linker+Nterm)

 If the surfaces are turned on for objects palm, linker and Nterm, then
 this will fade out the surface over frames 266 to 275. Setting the
 transparency to 1 and then reversing the order of the values will make
 the surface fade in.

 HTH

 Matthew Hogg
 University of Vermont
 Burlington, VT 05405


 Quoting Dirk Kostrewa kostr...@genzentrum.lmu.de:

 Dear Warren,

 using PyMOL without any additional plug-ins, like slerpy or eMovie,
 is it possible to fade in or out a surface of, say, a ligand, between
 scenes?

 Best regards,

 Dirk.

 ***
 Dirk Kostrewa
 Gene Center, A 5.07
 Ludwig-Maximilians-University
 Feodor-Lynen-Str. 25
 81377 Munich
 Germany
 Phone:        +49-89-2180-76845
 Fax:  +49-89-2180-76999
 E-mail:       kostr...@genzentrum.lmu.de
 WWW:  www.genzentrum.lmu.de
 ***




 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 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.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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