[PyMOL] Extending PyMOL or Plugins
I have several questions about extending PyMOL via modules or plugins. It appears that the primary difference between the two is windows for modules are created at during start up and plugin windows can be brought up on demand (from the plugins menu). Are there other differences? What is the current status of wxPython versus Tkinter for the future of PyMOL? I could look at wxPython, but I seem to be at a loss to find the python binary for the prebuilt Mac OS PyMOL Application. This has probably been brought up before, what are the issues with using an egg for extensions that have more than one file? Regards, Jeff Van Voorst -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ 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
Re: [PyMOL] Extending PyMOL or Plugins
On Jul 31 2011, Thomas Holder wrote: >Hi Jeff, > >> I have several questions about extending PyMOL via modules or plugins. >> >> It appears that the primary difference between the two is windows for modules are created at during start up and plugin windows can be brought up >> on demand (from the plugins menu). Are there other differences? > >I would say a pymol plugin is just a module that provides a >__init_plugin__ (or __init__) function which gets as argument the >PMGApp instance, which is PyMOLs external GUI. This is of course >required if the module wants to add items to the plugins menu or open >dialogs. But extending the plugins menu or opening any windows is not >mandatory for plugins or other modules. > >> What is the current status of wxPython versus Tkinter for the future of >> PyMOL? I could look at wxPython, but I seem to be at a loss to find the >> python binary for the prebuilt Mac OS PyMOL Application. >> This has probably been brought up before, what are the issues with using an >> egg for extensions that have more than one file? > >If you stay with pure python and just import your module, there should >be no issues. However the plugin architecture (modules within the >pmg_tk/startup directory) so far only recognizes single python files >(this will most likely change in the future). > More specifically, I am looking for the python interpreter that I should be using on Mac OS to build C modules to place in one of the prebuilt PyMOL's search paths. I found the -qc flags for PyMOL, and will try to use that. With regards to the single file for a plugin, it is technically true that only one file is recognized, but one can fairly easily add additional modules provided they can build them and place them in a place like ~pymol_dir/ext/lib/python./site-packages. However, compiled extension modules generally require the python binary to build correctly. My end goal is to be able to compile a boost.python extension module for PyMOL on Mac OS. It works as expected on recent Linux systems when I build PyMOL from source using the system Python. I am hoping that "pymol -qc" will work, but was wondering if that is the only way to access the python interpreter from a prebuilt PyMOL 1.4 on Mac OS. Regards, Jeff Van Voorst -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ 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
Re: [PyMOL] Writing a script yo pymol
If you are more comfortable with PyMOL commands, use a .pml file (somewhat like the gnuplot script you mentioned). If you prefer Python, use a .py file, and import the necessary modules (pymol, cmd from pymol, etc.). You can find working Python scripts that call pymol in many places. To color the atoms, use a selection and issue the color command (cmd.color() function) in the PyMOL script file (Python script file). If you want to move one object relative to another, you can use iterate state (http://www.pymolwiki.org/index.php/Iterate_State) to get the coordinates, and use alter state (http://www.pymolwiki.org/index.php/Alter_State) to apply the transformed coordinates. On the other hand, if you want to transform the camera or world coordinates you will need to ask someone else as I am not as familiar with those coordinates as I once was. Regards, Jeff Van Voorst -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ 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
[PyMOL] PyMOL source compiled under 32bit Fink
Hi, I have finally gotten the PyMOL source (SVN revision 3937) compiled and running using the 32 bit Fink Python2.6 package on Mac OS 10.6.6. If there is interest, I could write down the steps I took to do so. My main reason for doing this is to be able to start PyMOL from a Python program. If there is an easier/better way to import the necessary modules from MacPyMOL, there is no need for compiling it from source. However, as far as I know, one must compile PyMOL from source on a Mac to be able to import the pymol, pymol.cmd, etc. modules in a Python program. Best Regards, Jeff Van Voorst -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ 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