Hi Yang,

With PyMOL 2.1, "finish_launching" should not be necessary to use the PyMOL API 
in jupyter notebook. PyMOL will now automatically start a backend process 
(without the GUI, like with "-c") in the main thread if you call any pymol.cmd 
function. Check out this screenshot:

https://pymol.org/alpha/jupyter-notebook.png

On the other hand, "finish_launching" will launch PyMOL in a new thread with an 
event loop, which will cause 100% CPU usage (at least with "-c").

Cheers,
  Thomas

> On Mar 15, 2018, at 1:35 AM, Yang Su <s...@crystal.harvard.edu> wrote:
> 
> Dear List,
> 
> I would like to use some of the pymol capabilities with my other python code 
> in jupyter notebook. But after running
> 
> import pymol
> pymol.finish_launching(['pymol', '-qc'])
> 
> CPU usage stays at 100% for the python process. After
> 
> pymol.cmd.quit()
> 
> CPU usage returns to normal.  I see the same pattern when I run those 
> commands in an interactive python shell. Tried pymol 2.0/2.1 with both python 
> 2.7 and 3.6 on mac (anaconda) and linux.
> 
> Did I do anything wrong or is it a bug in pymol?
> 
> Thanks,
> 
> Yang

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Reply via email to