Few errors appear when we try to run the LigAlign plugin [1] in Pymol [2]. For example, if you try to run the ligand_alignment plugin, it will give you multiple errors including “Unable to initialize LigAlign v1.00“, or “can’t run LigAlign v1.00” or “incorrect Python syntax” or “Plugin has been installed but initialization failed“. In this article, we explain the reason for this issue and how you can rectify these errors.
LigAlign plugin requires Pymol that runs on Python 2.x and the latest versions are based on Python 3.x. To avoid these errors, you need to install an old version of Pymol, i.e., 1.8.x/1.7.x. This version is easy to install from the Ubuntu repository. But the problem is that it will overcome your newer version of Pymol and you don’t want that especially when you have a licensed version. I have been stuck with the same issue too. You would think of changing the path and would try to set the latest one as default but this can mess things up for beginners. I even tried to change the ligand_alignment.py script from version 2.x to 3.x but it won’t work. Because apparently, the 2to3 command does not work every time even after listing explicit fixers via arguments.
So, here is a simple solution for that. Install both versions. Follow this tutorial to install old and new versions of Pymol on the same system.
Now, after installing both the versions, download and install the LigAlign plugin as shown below.
Downloading LigAlign plugin
Go to this page and download the LigAlign or paste the following command into a terminal.
$ wget http://compbio.cs.toronto.edu/ligalign/ligalign_20100701.zip
Installing LigAlign
You can upload the zip file to Pymol as a plugin but it does not work every time. It will not accept it. Therefore, we will first extract it and then upload the python files one by one.
$ unzip ligalign_20100701.zip
It will create a new directory named ‘ligalign’. Move inside it and you will find three python files: keynat.py, munkres.py, and ligand_alignment.py.
Installing LigAlign plugin
Now, open the old version of Pymol. We are going to install the above-mentioned files one by one. Follow the steps given below.
- Go to ‘Plugin’ –> ‘Plugin Manager’ –> ‘Install New Plugin’.
- Click on ‘Choose File’.
- Direct to the ligalign directory.
- Select file ‘keynat.py‘. If something prompts, then click ‘yes’.
Now follow the same steps to install ‘munkres.py‘ and at last ‘ligand_alignment.py‘. Remember to install ligand_alignment.py in the last else it will give you errors.
Now, you should be able to see “LigAlign v1.00 loaded” on the Pymol console. Enjoy working with compounds!
References
- Heifets, A., & Lilien, R. H. (2010). LigAlign: flexible ligand-based active site alignment and analysis. Journal of Molecular Graphics and Modelling, 29(1), 93-101.
- The PyMOL Molecular Graphics System, Version 1.2r3pre, Schrödinger, LLC.