From: DeLano, W. <wa...@su...> - 2002-07-16 20:28:48
|
> So there is no way to run and control PyMol from within=20 > another python program? If PYMOL_PATH, LD_LIBRARY_PATH, and TCL_LIBRARY are correctly defined, = then you can launch PyMOL from an external Python program as shown in = examples/devel/start_pymol.py. =20 However, this is not recommended because the PyMOL launch sequence is = not fixed. If you do use it, be prepared to deal with changes down the = road.=20 > The reason for asking is that we are working on a python platform to=20 > run and evaluate protein-protein docking calculations. It would be a=20 > nice feature to be able to call up interaction surfaces and=20 > protein-protein clusters for display in PyMol and then interact with=20 > them from within our program. > As things are now I'm forced to treat PyMol as I would treat any=20 > molecular graphics program, that is write macros macros for it. This=20 > is of course much less convenient and less flexible compared to=20 > running PyMol from within our python code. > Has anyone been able to run and quit PyMol from within python without=20 > killing the interpreter? Is it possible? How? The underlying source of the limitation here is that the GLUT and Tcl/Tk = libraries which PyMOL uses do not support repeated set-up/take-down -- = they are both static "global" systems which steal threads and never = return. Thus, while PyMOL is not inherently limited in this fashion, = these building blocks which it employs are. Eventually there will be = versions of PyMOL which are both GLUT and TCL/Tk independent -- but not = today. Instead, I recommend using some kind of inter-process communication = along with object serialization to pass data from your program into = PyMOL. Python makes this relatively easy, but you are looking at a = little bit of development. Sorry the news isn't better! Warren |