Hi Yehuda,

> I'm doing a movie script and my boss wants me to add labels,
> I know how to write the cmd command but i because i'm using cmd.mdo i
> can't
> add more ' " ' then the one in begging and one on the end.
> the line with the problem is:
> cmd.mdo (691," hide spheres,ERYTHROMYCIN;show cartoon,rna_ery;set
> label_size, 30; set label_postion,[ 1.00000, 0.00000, 1.75000 ];  label
> ("resi 2041 and name C4*","resi")")
>
> what can i write to make the labels appear

If I'm understanding what you're trying to do correctly, you need to
escape the quotations in the label string.  In pymol (and python in
general), you can do this by either a backslash before the double quotes
for the label, or enclosing the label string in single quotes.

Since I probably didn't explain that very clearly, your example would
convert to (the quotes around the selection in the label command may not
be needed in this case):

1. cmd.mdo (691," hide spheres,ERYTHROMYCIN;show cartoon,rna_ery;set
 label_size, 30; set label_postion,[ 1.00000, 0.00000, 1.75000 ];  label
 (\"resi 2041 and name C4*\",\"resi\" )")
2. cmd.mdo (691," hide spheres,ERYTHROMYCIN;show cartoon,rna_ery;set
 label_size, 30; set label_postion,[ 1.00000, 0.00000, 1.75000 ];  label
 ('resi 2041 and name C4*','resi' )")

Alternatively, you could generate your movie as a png series (one png for
each frame), and combine them with convert (part of ImageMagick), ffmpeg,
or mencoder.

Good luck,

Pete

Pete Meyer
Fu Lab
BMCB grad student
Cornell University


Reply via email to