This is a read-only mirror of pymolwiki.org

Talk:Plugindirectory

From PyMOL Wiki
Jump to navigation Jump to search

Examples how to install plugins in their own directories:

rTools

cd ~/.pymol/pymolplugins
wget http://www.rubor.de/anlagen/rTools_0.7.2.zip
unzip rTools_0.7.2.zip
cd rTools
sed -i 's#^SCALE_PATH = .*$#SCALE_PATH = os.path.join(os.path.dirname(__file__), "protscale", "")#' color_protscale.py
sed -i "s#^SCRIPT_PATH='/usr.*\$#SCRIPT_PATH = os.path.dirname(__file__) + os.sep#" script_box.py
cat > __init__.py <<EOF
def __init__(self):
    import sys
    fromlist = [
        'color_protscale',
        'columba',
        'external_apps',
        'file_browser',
        'movie',
        'script_box',
    ]
    __import__(__name__, fromlist=fromlist, level=0)
    for name in fromlist:
        mod_name = __name__ + '.' + name
        mod = sys.modules[mod_name]
        mod.__init__(self)
EOF

ProMOL

cd ~/.pymol/pymolplugins
wget http://www.rit.edu/cos/ezviz/ProMOL.zip
unzip ProMOL.zip
mv "ProMOL Folder" ProMOL
cd ProMOL
mv ProMOL_302.py __init__.py
sed -i 's#"./modules/pmg_tk/startup#promol_dir + "#' __init__.py
sed -i "s#'./modules/pmg_tk/startup#promol_dir + '#" __init__.py
sed -i "s#'run ./modules/pmg_tk/startup#'run ' + promol_dir + '#" __init__.py
sed -i 's#^import os#import os;promol_dir = os.path.dirname(__file__)#'  __init__.py