Hi Robert
Thanks, in principle yes it's doing it now the way i was hoping. As I
wrote, the point was to be able to enter the command at the pymol prompt
like:
zoom_custom resi 117
and not
zoom_custom(117)
--> So to avoid the parenthesis (user friendliness and stuff...)
Thanks again
Martin
On 18.04.16 03:17, Robert Campbell wrote:
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 <ma....@bluewin.ch> 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 (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives:
http://www.mail-archive.com/pymol-users@lists.sourceforge.net
------------------------------------------------------------------------------
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 (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net