Hi Sena,

the second argument to mdo was not correct, there you had two strings 
and a semicolon what must be one string and the semicolon within. Works 
for me like this:

python
cmd.mset("1x100")
cmd.mdo(1,
   "set cartoon_transparency, 1.0; set ribbon_transparency, 0.0")
for i in range(40,60):
   cmd.mdo(i,
   "set cartoon_transparency, %f; set ribbon_transparency, %f" %
   (1-(i-40)/20.0, (i-40)/20.0))
cmd.frame(1)
python end

Cheers,
   Thomas

Rajagopalan, Senapathy wrote, On 05/04/11 19:50:
> Hi Everyone,
> 
> I am making a movie and want to show the transition between a cartoon 
> and a ribbon representation smoothly (fading out cartoon and fading in 
> ribbon) . 
> So I tried writing a simple python script like:
> -------
> for i in range(40,60):
> cmd.mdo (i, "set cartoon_transparency,%f" %( 1-(60-i)/60.0 ); "set 
> ribbon_transparency,%f" %( (60-i)/60.0 ) )
> -------
> 
> And 
> -------
> for i in range(40,60):
> cmd.mdo (i, "set cartoon_transparency,%f" %( 1-(60-i)/60.0 ) )
> for j in range (40,60):
> cmd.mdo (j, "set ribbon_transparency,%f" %( (60-j)/60.0 ) )
> ------
> 
> 
> And various other combinations, but none seem to produce the result that 
> I desire. Can anyone help me with the scripting as my python knowledge 
> is very basic.
> 
> Thanks
> Sena

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to