Commit c2fab6e9 authored by JinyuanSun's avatar JinyuanSun
Browse files

update

parent a36cd2ae
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
# PyMOL ChatGPT Plugin
![img](./assets/img.png)
<!-- ![img](./assets/img.png) -->
## Overview
The PyMOL ChatGPT Plugin is a simple yet powerful tool that integrates OpenAI's GPT-3.5-turbo model into PyMOL, allowing users to interact with the model and get relevant suggestions, explanations, and guidance on various PyMOL-related topics.

@@ -21,6 +21,31 @@ load https://raw.githubusercontent.com/JinyuanSun/ChatMol/main/chatmol.py
## Usage
1. Set your OpenAI API key by entering the following command in the PyMOL command line: `set_api_key your_api_key_here` (replace `your_api_key_here` with your actual API key). The API key will be saved in the same directory as the plugin script for future use.
2. To interact with ChatGPT, simply use the `chatgpt` command followed by your question or message in the PyMOL command line, e.g., `chatgpt "How do I align two proteins?"`.
```text
ChatGPT: To align two proteins in PyMOL, you can use the `align` command. Here's an example: 
 
```python
# Load the two protein structures
fetch 1ake
fetch 4ake
 
# Align the two structures
align 1ake, 4ake
``
 
In this example, we first load two protein structures using the `fetch` command. Then, we use the `align` command to align the two structures. The first argument to the `align` command is the reference structure (the one that will not be moved), and the second argument is the mobile structure (the one that will be moved to align with the reference structure). 
 
By default, the `align` command aligns the two structures based on their backbone atoms. You can also specify which atoms to use for the alignment by adding the `atommask` option to the `align` command. For example:
 
```python
# Align the two structures using only the alpha-carbon atoms
align 1ake and name ca, 4ake and name ca
``
 
In this example, we use the `name` selection operator to select only the alpha-carbon atoms (`ca`) of both structures for the alignment.
```
3. You can let `ChatMol` to automatically run the code following your command, e.g., `chatgpt How do I color a protein by secondary structure?, True`.
![img](./assets/img2.png)
## Features
- Simple integration with PyMOL.
- Convenient command-line interface.

assets/img2.png

0 → 100644
+841 KiB
Loading image diff...