Re: [PyMOL] Function signature

2016-04-23 Thread Martin Hediger
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

Re: [PyMOL] Function signature

2016-04-17 Thread Robert Campbell
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

[PyMOL] Function signature

2016-04-17 Thread Martin Hediger
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" + " " +