Plugindirectory: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
Line 7: Line 7:


== Adding Pymol-script-repo to PyMOL search path ==
== Adding Pymol-script-repo to PyMOL search path ==
You should have the "Pymol-script-repo" directory  or another directory with your plugins to the PyMOL search path.
You should have the "Pymol-script-repo" directory  or another directory with your plugins added to the PyMOL search path.
We need to import and also import folder '''plugins''' before the GUI launches. So insert into your [[pymolrc|$HOME/.pymolrc]] file:
 
We need to import import folder '''plugins''' "Pymol-script-repo/plugins"<br>
before the GUI launches. So insert into your [[pymolrc|$HOME/.pymolrc]] file:


=== For windows users ===
=== For windows users ===

Revision as of 11:17, 3 December 2011

Introduction

This page describes how to set up a personal plugin directory, that will automatically install plugins found herein. It supports single python files as well as directories which contain a __init__.py file.

This plugin is being used in the Pymol-script-repo project Pymol-script-repo.

Adding Pymol-script-repo to PyMOL search path

You should have the "Pymol-script-repo" directory or another directory with your plugins added to the PyMOL search path.

We need to import import folder plugins "Pymol-script-repo/plugins"
before the GUI launches. So insert into your $HOME/.pymolrc file:

For windows users

  1. Open notepad
  2. Write (Remember forward slashes)
import sys
sys.path.append('C:/Users/YOURNAME/Documents/Pymol-script-repo')
import plugins

Save under: C:/Users/YOURNAME/pymolrc.pym (Set: "Save as type" to "All files")

For Ubuntu/Mint users

gedit ~/.pymolrc

Write

import sys
sys.path.append('/home/YOURNAME/Software/pymol/Pymol-script-repo')
import plugins

Save and exit

Python Code

This code has been put under version control. In the project, Pymol-script-repo.

For a color coded view:

https://github.com/Pymol-Scripts/Pymol-script-repo/blob/master/__init__.py