This is a read-only mirror of pymolwiki.org

Difference between revisions of "Plugins"

From PyMOL Wiki
Jump to navigation Jump to search
m (2 revisions)
m (1 revision)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Overview ==
+
Plugins are external modules that add functionality to PyMOL.
Plugins are external modules that add functionality to PyMOL. Latest version of PyMOL came with two plugins already installed [[APBS]] and [[PDB_Loader_Service]]. Since version 1.5.0.5 PyMOL also comes with a [[Plugin Manager]], which can be used to conveniently install and uninstall plugins. You can find a list of several available PyMOL plugins on [http://pymolwiki.org/index.php/Category:Plugins this] page. If you are interested into writing your own plugin please read the [[Plugins_Tutorial]].
 
  
 +
Plugins can be single Python files (*.py) or directories with an <code>__init__.py</code> file (see [[PluginArchitecture]]).
 +
 +
Looking for available Plugins? Browse the [[:Category:Plugins|plugins category]].
  
 
==Installing Plugins==
 
==Installing Plugins==
To install a plugin open PyMOL and then go to ''Plugin -> Plugin manager -> Install new plugin''. You will have the option to install from a file on your computer or directly from the PyMOL wiki by providing the proper url (the name of the plugin's page at the PyMOL wiki).
 
  
Below you will find some more information that may be relevant when installing plugins and that is specific to different operating systems.
+
To install a plugin, open PyMOL and then go to
 +
 
 +
: '''Plugin &gt; [[Plugin Manager]] &gt; Install new plugin'''
 +
 
 +
You will have the option to install from a file on your computer (*.py, *.zip) or directly from the PyMOLWiki by providing the wiki page url.
 +
 
 +
[[Image:plugin_manager_install_new.png]]
  
=== Plugins on Linux ===
+
== Writing Plugins ==
  
On Linux, PyMOL is generally installed on a system's folder. Thus, if you want to install plugins you should launch PyMOL from a terminal using the command:
+
See the [[Plugins Tutorial]].
  
sudo pymol
+
== Legacy Notes ==
  
Alternatively, if you launch PyMOL without administrators rights. The plugin manager will ask you if you want to install the plugin on the local folder
+
=== Before Version 2.0 ===
  
~/.pymol/startup.
+
Plugins written with PyQt5 do not run in PyMOL 1.x.
  
=== Plugins on OS X ===
+
PyMOL 2.x has a legacy layer for Tkinter to support old plugins, but the preferred toolkit for new plguins is PyQt5.
  
==== Using MacPyMOL ====
+
=== Before Version 1.5.0.6 ===
The standard OS X Pymol application, MacPyMOL.app does not run with the Tcl/Tk interface which is required for plugins to work. However, a quick renaming of the program from MacPyMOL.app to PyMOLX11Hybrid.app makes the application run as an X11 application, and plugins are now available.
 
  
To rename the executable, right click (or control click) on MacPyMOL and choose "Get Info" in the Panel. Change the Name & Extension to PyMOLX11Hybrid.app. This name can also be changed using the mv command in Terminal.app.
+
Before PyMOL's Plugin Manager was added in version 1.5.0.6, plugins could not be installed per user, the plugin search path was a single directory inside the PyMOL installation:
 +
'''$PYMOL_PATH/modules/pmg_tk/startup'''
  
Once this change is made, half of the program will show up under the X11 icon, and half will show up under the MacPyMOL icon.
+
Plugins were limited to single Python files, directories were not supported yet.
  
==== Using a Package Manager ====
+
=== MacPyMOL ===
An alternative to renaming MacPyMOL is to download the PyMOL installation using a package manager such as [[MAC_Install#PyMOL_and_Fink|Fink]], [[MAC_Install#PyMOL_in_MacPorts|MacPorts]], or [[MAC_Install#Installing_PyMOL_with_Homebrew|Homebrew]].
 
  
fink install pymol-py27
+
MacPyMOL was the native macOS version of PyMOL before version 2.0. It supported Plugins only in the [[MAC_Install#X11_Hybrid|X11 Hybrid]] mode.
  
=SEE ALSO=
+
== See Also ==
[[Plugin_manager]]
 
  
 +
* [[Plugin Manager]]
 +
* [[Plugins Tutorial]]
 +
* [[PluginArchitecture]]
  
 
[[Category:Plugins]]
 
[[Category:Plugins]]

Latest revision as of 03:24, 10 December 2018

Plugins are external modules that add functionality to PyMOL.

Plugins can be single Python files (*.py) or directories with an __init__.py file (see PluginArchitecture).

Looking for available Plugins? Browse the plugins category.

Installing Plugins

To install a plugin, open PyMOL and then go to

Plugin > Plugin Manager > Install new plugin

You will have the option to install from a file on your computer (*.py, *.zip) or directly from the PyMOLWiki by providing the wiki page url.

Plugin manager install new.png

Writing Plugins

See the Plugins Tutorial.

Legacy Notes

Before Version 2.0

Plugins written with PyQt5 do not run in PyMOL 1.x.

PyMOL 2.x has a legacy layer for Tkinter to support old plugins, but the preferred toolkit for new plguins is PyQt5.

Before Version 1.5.0.6

Before PyMOL's Plugin Manager was added in version 1.5.0.6, plugins could not be installed per user, the plugin search path was a single directory inside the PyMOL installation: $PYMOL_PATH/modules/pmg_tk/startup

Plugins were limited to single Python files, directories were not supported yet.

MacPyMOL

MacPyMOL was the native macOS version of PyMOL before version 2.0. It supported Plugins only in the X11 Hybrid mode.

See Also