Hi Jianhao,
Any easy solution is to use cmd.do with lets you issue pml commands in Python:
cmd.do('label (n. CA and (resi 800-850 and chain A)), "%s%s"%(resn, resi)')
Best regards,
Blaine
Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE 10th Street, BRC 466
Oklahoma City, OK 73104-5419
________________________________________
From: C.J. [[email protected]]
Sent: Saturday, May 02, 2020 4:23 PM
To: pymol-users
Subject: [EXTERNAL] [PyMOL] resn variable in label command
Hi all,
I have some trouble in using label command.
The command below in "pymol>" box works
label (n. CA and (resi 800-850 and chain A)), "%s%s"%(resn, resi)
But the script below doesn't work.
cmd.label("(n. CA and (resi 800-850 and chain A))", "%s%s"%(resn, resi))
Do I have anything wrong with this? Thank you!
Jianhao
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/[email protected]
Unsubscribe:
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe