Dear PyMOLers,
thanks a lot to all of you for your helpful suggestions! I will try
Tsjerk's way that probably keeps me from writing an external Fortran
program for generating pymol commands ;-)
Best regards,
Dirk.
Am 01.09.2009 um 20:42 schrieb 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. Hogg<mh...@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-
us...@lists.sourceforge.net
*******************************************************
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