Re: [PyMOL] How to iterate commands in pymol

2020-11-01 Thread Robert Campbell
Hi Zuben,

You need to import the colorbyrmsd.py script within your script, then you can 
call it that way.  For example your script could say:

import colorbyrmsd as cbr

for obj in seleobjs:
  cmd.enable(obj)
  cbr.colorbyrmsd(obj,target)

Cheers,
Rob

On Sat, 2020-10-31 20:36  +,  "Brown, Zuben"  
wrote:

> Hi,
> 
> I'd like to iterate using a script in pymol but one of the commands
> I'd like to use does not have an associated cmd.API. For example, how
> do I run:
> 
> for obj in seleobjs:
> cmd.enable(obj)
> colorbyrmsd(obj, target)   <--- This third line doesn't work since
> colorbyrmsd does not have a cmd.colorbyrmsd.
> 
> Is there a way I can run something like:
> cmd.executecommand("colorbyrmsd {0}, target".format(obj))  ?
> 
> Best regards,
> 
> Zuben



-- 
Robert L. Campbell, Ph.D.
Academic Advisor, BHSc Program
Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Queen's University, Kingston, ON K7L 3N6  Canada
Botterell Hall Rm 644 Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc


___
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


[PyMOL] How to iterate commands in pymol

2020-10-31 Thread Brown, Zuben
Hi,

I'd like to iterate using a script in pymol but one of the commands I'd like to 
use does not have an associated cmd.API.
For example, how do I run:

for obj in seleobjs:
cmd.enable(obj)
colorbyrmsd(obj, target)   <--- This third line doesn't work since colorbyrmsd 
does not have a cmd.colorbyrmsd.

Is there a way I can run something like:
cmd.executecommand("colorbyrmsd {0}, target".format(obj))  ?

Best regards,

Zuben
___
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