Hi Yang,

Very good questions. I don't think that it's documented anywhere. Reference 
counting is maintained, I fixed that up as best as I could before the PyMOL 2.0 
release (in PyMOL 1.x it leaks references). Looks like there is no way to 
introspect whether start() has been called already.

Cheers,
  Thomas

> On Apr 24, 2018, at 6:16 PM, Yang Su <s...@crystal.harvard.edu> wrote:
> 
> Thanks Thomas. The code snippet works. Does start(), stop() maintain 
> reference counting? Is there a way to know if it's already started/stopped? 
> Is this API documented somewhere?
> 
> Thanks,
> Yang
> 
> 
> On Mon, Apr 23, 2018 at 1:15 PM, Thomas Holder 
> <thomas.hol...@schrodinger.com> wrote:
> Hi Yang,
> 
> Yes it's possible to have independent instances. The API has actually been 
> around for a long time. For some reason it was never widely adopted and thus 
> is not very thoroughly tested. Please report any bugs you encounter.
> 
> Example:
> 
> import pymol2
> p = pymol2.PyMOL()
> p.start()
> p.cmd.fragment('ala')
> p.cmd.show_as('sticks')
> p.cmd.zoom()
> p.cmd.png('/tmp/ala.png', 1000, 800, dpi=150, ray=1)
> p.stop()
> 
> Cheers,
>   Thomas
> 
> > On Apr 19, 2018, at 3:33 PM, Yang Su <s...@crystal.harvard.edu> wrote:
> > 
> > Hi,
> > 
> > Is it possible to start multiple independent pymol backend processes in a 
> > python script/jupyter notebook? Now with PyMOL 2.1 I can 'import pymol' and 
> > call a pymol.cmd function to start a backend process, but this is kind of 
> > 'global'. I'm looking for a way to manage multiple PyMOL sessions in 
> > parallel, each manipulating its own structures.
> > 
> > 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