ChatMol

chatmol-streamlit

Streamlit interface for ChatMol’s Agentic Molecular Visualization (AMV).

Overview

This app runs a Streamlit GUI that lets you interact with an LLM-powered PyMOL agent. The agent can:

Requirements

You can install the main dependencies with conda/pip:

conda install -c conda-forge pymol-open-source
pip install streamlit==1.35.0 openai chatmol

Environment variables

The app expects one or more API key environment variables. By default the UI is configured to use OPENAI_API_KEY for all models. Set it before starting Streamlit:

export OPENAI_API_KEY="sk-..."

If you prefer different env var names for different model roles (PyMOL commands, view analysis, agent) you can change them in the sidebar at runtime — the app lets you specify the name of the environment variable to read for each role.

Running the app

From the chatmol-streamlit directory run:

streamlit run app.py

The Streamlit sidebar contains a Model & API settings section where you can:

Changes are applied immediately for new requests.

Example prompt

Try the test prompt shown in the sidebar (also used in the app):

Highlight aromatic sidechains of 1pga and prepare to scientific publication level.

When you submit a prompt the app will display assistant messages in the chat area and show the latest screenshot.png produced by PyMOL.

Troubleshooting