Hi Martin,
If you simply want to be able to have the function operate on any
selection, simply do this:
def zoom_custom(position):
cmd.zoom(position)
cmd.extend("zoom_custom", zoom_custom)
This allows you to type:
zoom_custom resi 117
or any other more complicated selection syntax without any parentheses.
Perhaps I am missing something in your specific requirements?
Cheers,
Rob
On Sun, 2016-04-17 20:18 +0200, Martin
Hediger <[email protected]> wrote:
> Dear all
>
> In PyMOL, the syntax for eg. zooming in on residue 110 of a protein
> would be
>
> zoom resi 117
>
> I have a pymol script where I define a function that also zooms in on
> a residue (it's simple, only to illustrate the point):
>
> def zoom_custom(position):
> cmd.zoom("resi" + " " + str(position))
> cmd.extend("zoom_custom", zoom_custom)
>
> However, when I want to call it from the PyMOL promt, i have to use
>
> zoom_custom(117)
>
> i.e. using parenthesis. How do i need to design the function such
> that I can enter it as above?
>
> Thanks and best regards
> Martin
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager Applications Manager provides deep performance insights into
> multiple tiers of your business applications. It resolves application
> problems quickly and reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> PyMOL-users mailing list ([email protected])
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives:
> http://www.mail-archive.com/[email protected]
--
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University,
Kingston, ON K7L 3N6 Canada
Tel: 613-533-6821
<[email protected]> http://pldserver1.biochem.queensu.ca/~rlc
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]