From: Thomas H. <tho...@sc...> - 2019-12-16 16:38:05
|
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 <br...@gm...> wrote: > > 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 system to change the properties and representation. > > If I run it calling func() from a python script, its effects are almost instant. If I call it with cmd.do('func') (or directly from within pymol with func), it’s extremely slow (up to 10 seconds) and Pymol freezes completely during this time. > > I expected this to be due to an overhead of the api itself, but when I do the same thing with a simpler function, I see no noticeable difference. > > Why exactly is this happening? And more importantly, how can I get the performance of func even when I call it from within pymol? > > Thank you, > Lorenzo > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |