Hi Enrico, This is actually quite simple, see the PyMOL wiki: https://pymolwiki.org/index.php/Aa_codes
Paste this python dictionary into PyMOL: one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \ 'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y', \ 'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A', \ 'GLY':'G', 'PRO':'P', 'CYS':'C'} The one letter codes can be accessed with one_letter[resn] To do something like Y-119: label sele, '{}-{}'.format(one_letter[resn], resi) # front end command cmd.label('sele', "'{}-{}'.format(one_letter[resn], resi)") # backend command Cheers, Ali Ali Kusay | BPharm (Hons) | PhD Candidate & Pharmacist The University of Sydney School of Pharmacy | Faculty of Medicine and Health 424, Brain and Mind Centre | The University of Sydney | NSW 2050 On 12/1/22, 11:26 pm, "Enrico Martinez" <jmsstarli...@gmail.com> wrote: exactly we may do it in the context meny for the particular selection (we do not need to select a particular residues, so ..) but may we create the same label using label command as well ?? cmd.label('sele', 'resn') I think something should be used instead of 'resn'. there is also option 'resi' which shows only the number of the amino acid. So I need to combine "resn" and "resi" :-) вт, 11 янв. 2022 г. в 21:27, Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>: > > For label like ‘R87’ I manually do “label /s309/B/H/ARG`87/CA, ‘R87’” > > > > Vaheh > > > > From: Enrico Martinez <jmsstarli...@gmail.com> > Sent: Tuesday, January 11, 2022 12:34 PM > To: pymol-users <pymol-users@lists.sourceforge.net> > Subject: [PyMOL] Set label for visible amino acids > > > > Dear Pymol users! > Here is the chain of the pymol commands that I am using to label the > visible amino-acids shown as lines in the current pymol session. > cmd.select('name CA and rep lines') > cmd.label('sele', 'resn') > cmd.set('label_font_id', '14') > cmd.set('label_color', 'indigo') > cmd.set('label_position', '3,0,0') > It produces nice labeling according to the amino acid name (example > Tyr). How it would be possible to indicate additionally the number of > the amino acid like Tyr-119 or simply using one letter code + the > number? > Many thanks in advance > Enrico > > > _______________________________________________ > PyMOL-users mailing list > Archives: https://protect-au.mimecast.com/s/JP1lCjZ1N7inr9pkzFWa1_a?domain=mail-archive.com > Unsubscribe: https://protect-au.mimecast.com/s/Kl0ACk81N9tOENmZDfVicB0?domain=sourceforge.net _______________________________________________ PyMOL-users mailing list Archives: https://protect-au.mimecast.com/s/JP1lCjZ1N7inr9pkzFWa1_a?domain=mail-archive.com Unsubscribe: https://protect-au.mimecast.com/s/Kl0ACk81N9tOENmZDfVicB0?domain=sourceforge.net _______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe