From: Tsjerk W. <ts...@gm...> - 2006-12-19 12:28:14
|
Hi Rafael, You can use cmd.label(selection,'"objectname-"+resn+resi') Do mind the quotes.., the label string is _eval_uated. Of course, if objn = "objectname", it also works as cmd.label(selection,'objn+"-"+resn+resi') Cheers, Tsjerk On 12/19/06, Rafael Najmanovich <raf...@eb...> wrote: > Hi There, > > Is there a way to display custom labels from within scripts? > > I need to display labels which include the object-name - this is not > possible using cmd.label it seems. > I can define a string as: > lab = "%s-%s%s" % (objn,resn,resi) > where objn is a variable that contains the object-name. I'd like to display > this string and I ask if there is some way to display these strings in the > same way/position as cmd.label normally would. > > Thanks for your help. > > r. > > > > Dr. Rafael Najmanovich > European Bioinformatics Institute > Wellcome Trust Genome Campus > Cambridge CB10 1SD > United Kingdom > > rafael.najmanovich at ebi.ac.uk - www.ebi.ac.uk/~rafi > +44-1223-492599 (voice) +44-7786-968257(mobile) +44-1223-494468 (fax) > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > -- 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 |