Re: [PyMOL] how to use cmd.label command

2022-07-09 Thread Thomas Holder
The second argument must be a string, so just put quotes around it: cmd.label('CAs', '"%s%s" % (one_letter[resn],resi)') This also works: cmd.label('CAs', 'f"{oneletter}{resi}"') Cheers, Thomas On Fri, Jul 8, 2022 at 6:09 PM sunyeping via PyMOL-users wrote: > > Dear all, > > I want to label

[PyMOL] How to use cmd.label command

2022-07-08 Thread sunyeping via PyMOL-users
Dear all, I want to label residues with the resn+resi, and I tried the following command 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',

[PyMOL] how to use cmd.label command

2022-07-08 Thread sunyeping via PyMOL-users
Dear all, I want to label residues with the resn+resi, and I tried the following command 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',