Re: [PyMOL] Performance of extended commands vs python function

2019-12-18 Thread Lorenzo Gaifas
Hi Thomas, I'm not sure I get it. Does that mean that `cmd.sync()` is actually not doing anything at all if called outside of `cmd.do()`? Cheers, Lorenzo Il giorno mer 18 dic 2019 alle ore 10:49 Thomas Holder < thomas.hol...@schrodinger.com> ha scritto: > Hi Lorenzo, > > Thanks for the script,

Re: [PyMOL] Performance of extended commands vs python function

2019-12-18 Thread Thomas Holder
Hi Lorenzo, Thanks for the script, and great that you could identify cmd.sync() as the culprit. I looked at the code, cmd.do("cmd.sync()") literally blocks itself until it times out after 1 second. cmd.do() puts commands in a queue, and cmd.sync() tries to ensure that all queued commands have

Re: [PyMOL] Performance of extended commands vs python function

2019-12-17 Thread Lorenzo Gaifas
After playing around with it a bit longer, it's clear that I misunderstood. The issue was not with `cmd.alter` nor with `cmd.show_as`, but with `cmd.sync`. I was calling many times a smaller function that contained `cmd.sync()`, which resulted - it seems - in all these calls piling up. Still, I

Re: [PyMOL] Performance of extended commands vs python function

2019-12-16 Thread Thomas Holder
OK thanks. I haven't seen such performance differences before and couldn't reproduce it so far. Could you share your script (and data files if possible) with me? Thanks, Thomas > On Dec 16, 2019, at 5:42 PM, Lorenzo Gaifas wrote: > > Yes, it does. Both cases are with the GUI and ewual

Re: [PyMOL] Performance of extended commands vs python function

2019-12-16 Thread Lorenzo Gaifas
Yes, it does. Both cases are with the GUI and ewual graphical representation. On Mon, Dec 16, 2019, 17:37 Thomas Holder wrote: > Hi Lorenzo, > > When you say "run from a python script", is that with the graphical GUI? > That "instant update", does that include instant update of visual >

Re: [PyMOL] Performance of extended commands vs python function

2019-12-16 Thread Thomas Holder
Hi Lorenzo, When you say "run from a python script", is that with the graphical GUI? That "instant update", does that include instant update of visual representations? Thanks, Thomas > On Dec 13, 2019, at 12:55 PM, Lorenzo Gaifas wrote: > > Dear Pymol users, > > I just discovered

[PyMOL] Performance of extended commands vs python function

2019-12-13 Thread Lorenzo Gaifas
Dear Pymol users, I just discovered something I did not expect: the same python function can have extremely different performance when called as a python function or using the pymol api. To be more specific: I have a function func that (among other things) uses cmd.alter several times over a big