Skip to content

An AI Assistant for the PyMOL molecular visualization software

Notifications You must be signed in to change notification settings

abdullateefv/PyMolCopilot

Repository files navigation

PyMOL Copilot

An AI Assistant for the PyMOL molecular visualization software

Abdul Lateef FNU, Arqam Usman Ali, Sriram Koyalkar, Saipranith Oku

title image

Installation

  1. To get started make sure you have the PyMOL application installed, clone the plugin repo from inside desired working directory:
git clone https://github.com/abdullateefv/PyMolCopilot.git
  1. Set up your conda environment after making sure you have Anaconda installed:
cd PyMolCopilot
conda env create -f environment.yml
conda activate pymolEnv

Anytime you run the plugin be sure to use the appropriate env to include project dependencies by using

conda activate pymolEnv
  1. Add the .env file with API Key to the project files in the top-level directory

  2. Execute the terminal command:

pymol
  1. The PyMOL application should launch. Load the plugin into PyMOL:

    • Navigate to the Plugin menu at the top.
    • Select Plugin Manager from the dropdown.
    • Go to the Install New Plugin tab.
    • Choose Install from local file.
    • Select the __init__.py file in the project files top-level folder, click Open
  2. Specify the directory to install the plugin files in, click Ok, close Plugin Manager window

    • These files will need to be deleted and reinstalled from step 4 to see new code modification changes
  3. Launch Plugin:

    • Navigate to the Plugin menu at the top.
    • Select PyMol Copilot from the dropdown.

File Structure

PyMolCopilot/  
├── backend/  
│   ├── toolsDescription.json  
│   ├── appearanceFunctions.py  
│   └── ...  
├── frontend/ 
│   ├── chatWindowComponent/  
│   │   ├── chatWindowController.py  
│   │   ├── chatWindowStyle.qss
│   │   ├── chatWindowView.ui
│   │   └── ...  
│   └── ...  
├── tests/  
│   ├── conftest.py
│   ├── test_appearanceFunctions.py  
│   └── ...  
├── utilities/  
│   ├── runConversation.py  
│   └── ...  
├── .env
├── .gitignore
├── __init__.py  
├── architecture.png
├── environment.yml  
├── README.md
└── title.jpg
  • Backend directory holds function modules made available to Copilot for invocation to fulfill user requests
    • Functions grouped into .py modules by common theme
    • toolsDescription.json describes each function's usage to Copilot
      • Must update with each new function added
  • Frontend directory holds UI components
    • Each have a Qt .ui XML Structure File, a .qss stylesheet file, and a .py controller file
    • Grouped into components where each component is an application window
  • Utilities holds middleware & functions used across application
    • Includes communication and data processing logic for OpenAI API/GPT interfacing

Architecture

title image

About

An AI Assistant for the PyMOL molecular visualization software

Topics

Resources

Stars

Watchers

Forks

Languages