md-agent

md-agent

Molecular dynamics simulations with an LLM agent

Stars: 73

Visit
 screenshot

MD-Agent is a LLM-agent based toolset for Molecular Dynamics. It uses Langchain and a collection of tools to set up and execute molecular dynamics simulations, particularly in OpenMM. The tool assists in environment setup, installation, and usage by providing detailed steps. It also requires API keys for certain functionalities, such as OpenAI and paper-qa for literature searches. Contributions to the project are welcome, with a detailed Contributor's Guide available for interested individuals.

README:

MDAgent is a LLM-agent based toolset for Molecular Dynamics. It's built using Langchain and uses a collection of tools to set up and execute molecular dynamics simulations, particularly in OpenMM.

Environment Setup

To use the OpenMM features in the agent, please set up a conda environment, following these steps.

conda env create -n mdagent -f environment.yaml
conda activate mdagent

If you already have a conda environment, you can install dependencies before you activate it with the following step.

  • Install the necessary conda dependencies: conda env update -n <YOUR_CONDA_ENV_HERE> -f environment.yaml

Installation

pip install git+https://github.com/ur-whitelab/md-agent.git

Usage

The next step is to set up your API keys in your environment. An API key for LLM provider is necessary for this project. Supported LLM providers are OpenAI, TogetherAI, Fireworks, and Anthropic. Other tools require API keys, such as paper-qa for literature searches. We recommend setting up the keys in a .env file. You can use the provided .env.example file as a template.

  1. Copy the .env.example file and rename it to .env: cp .env.example .env
  2. Replace the placeholder values in .env with your actual keys

You can ask MDAgent to conduct molecular dynamics tasks using OpenAI's GPT model

from mdagent import MDAgent

agent = MDAgent(model="gpt-3.5-turbo")
agent.run("Simulate protein 1ZNI at 300 K for 0.1 ps and calculate the RMSD over time.")

Note: to distinguish Together models from the rest, you'll need to add "together" prefix in model flag, such as agent = MDAgent(model="together/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo")

LLM Providers

By default, we support LLMs through OpenAI API. However, feel free to use other LLM providers. Make sure to install the necessary package for it. Here's list of packages required for alternative LLM providers we support:

  • pip install langchain-together to use models from TogetherAI
  • pip install langchain-anthropic to use models from Anthropic
  • pip install langchain-fireworks to use models from Fireworks

Contributing

We welcome contributions to MDAgent! If you're interested in contributing to the project, please check out our Contributor's Guide for detailed instructions on getting started, feature development, and the pull request process.

We value and appreciate all contributions to MDAgent.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for md-agent

Similar Open Source Tools

For similar tasks

For similar jobs