PyMOL Plugin Integration
Installation guide and usage instructions for the PyMOL MCP plugin, including safe command wrapper configuration.
PyMOL Plugin Installation & Usage
Updating the Plugin
If you have an older version of the plugin currently running in PyMOL, you must update it to ensure compatibility with the mcp_start command.
Installation Steps
1. Open PyMOL
Launch the PyMOL application on your machine.
2. Open Plugin Manager
Navigate to Plugin > Plugin Manager in the top menu.
3. Remove Old Version
Go to the Installed Plugins tab. Locate and remove any previous versions of the MCP plugin.
4. Install New Version
Go to the Install New Plugin tab. Select the directory containing the updated __init__.py and .ui files.
5. Restart PyMOL
Close PyMOL completely and relaunch it to finalize the installation.
Running from the Command Line
Once the plugin is installed and the mcp_start command is registered, you can launch it directly from your terminal.
Usage
Open your terminal or command prompt and execute:
pymol -d "mcp_start"Configuring the PyMOL Command
To avoid environment conflicts and enable the standard pymol command from any terminal interface, we recommend using an isolated "Safe Commands" directory wrapper rather than adding the PyMOL installation directly to your system PATH.
1. Create the "Safe Commands" Directory Open PowerShell and create a dedicated folder for your global commands:
mkdir C:\Users\<user>\MyCommands2. Add to PATH
- Go to your Windows Environment Variables -> Path -> Edit.
- Click New, add
C:\Users\<user>\MyCommands, and click OK to save.
3. Create the Batch Wrapper
- Inside the
MyCommandsfolder, create a new text document and name itpymol.bat(ensure Windows is not hiding the.txtextension). - Edit the file, paste the following code, and save:
@echo off
"C:\Users\<user>\AppData\Local\Schrodinger\PyMOL2\pymol.exe" %*(Note: Adjust the path if your PyMOL executable is named differently, like pyMOLWin.exe, or installed in a different location).
Open your terminal and create a symbolic link from your PyMOL application to your local bin directory:
sudo ln -s /Applications/PyMOL.app/Contents/MacOS/PyMOL /usr/local/bin/pymolOpen your terminal and create a symbolic link from your PyMOL executable to your local bin directory:
sudo ln -s /path/to/extracted/pymol/folder/pymol /usr/local/bin/pymolVerification
Open a new terminal or command prompt session and verify the setup by triggering PyMOL in headless (-c) and quiet (-q) mode:
pymol -cq(If successful, the terminal will process the command without launching the GUI or printing startup logs.)