-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
need to update my hydrogen bonding branch with changes in main for a…
…ccuracy. Merge branch 'main' of https://github.com/ur-whitelab/md-agent into hydrogen_bonding
- Loading branch information
Showing
65 changed files
with
1,624 additions
and
9,743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# Copy this file to a new file named .env and replace the placeholders with your actual keys. | ||
# REMOVE "pragma: allowlist secret" when you replace with actual keys. | ||
# DO NOT fill your keys directly into this file. | ||
|
||
# OpenAI API Key | ||
OPENAI_API_KEY=YOUR_OPENAI_API_KEY_GOES_HERE # pragma: allowlist secret | ||
|
||
# Serp API key | ||
SERP_API_KEY=YOUR_SERP_API_KEY_GOES_HERE # pragma: allowlist secret | ||
# PQA API Key to use LiteratureSearch tool (optional) -- it also requires OpenAI key | ||
PQA_API_KEY=YOUR_PQA_API_KEY_GOES_HERE # pragma: allowlist secret | ||
|
||
# Optional: add TogetherAI, Fireworks, or Anthropic API key here to use their models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
MD-Agent is a LLM-agent based toolset for Molecular Dynamics. | ||
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. | ||
- Create conda environment: `conda env create -n mdagent -f environment.yaml` | ||
- Activate your environment: `conda activate mdagent` | ||
``` | ||
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` | ||
|
||
If you already have a conda environment, you can install dependencies with the following step. | ||
- Install the necessary conda dependencies: `conda install -c conda-forge openmm pdbfixer mdtraj` | ||
|
||
|
||
## Installation | ||
``` | ||
pip install git+https://github.com/ur-whitelab/md-agent.git | ||
``` | ||
|
||
|
||
## Usage | ||
The first step is to set up your API keys in your environment. An OpenAI key is necessary for this project. | ||
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 | ||
|
||
<!-- ## Using Streamlit Interface | ||
If you'd like to use MDAgent via the streamlit app, make sure you have completed the steps above. Then, in your terminal, run `streamlit run st_app.py` in the project root directory. | ||
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")` | ||
|
||
From there you may upload files to use during the run. Note: the app is currently limited to uploading .pdb and .cif files, and the max size is defaulted at 200MB. | ||
- To upload larger files, instead run `streamlit run st_app.py --server.maxUploadSize=some_large_number` | ||
- To add different file types, you can add your desired file type to the list in the [streamlit app file](https://github.com/ur-whitelab/md-agent/blob/main/st_app.py). --> | ||
## 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 MD-Agent! If you're interested in contributing to the project, please check out our [Contributor's Guide](CONTRIBUTING.md) for detailed instructions on getting started, feature development, and the pull request process. | ||
We welcome contributions to MDAgent! If you're interested in contributing to the project, please check out our [Contributor's Guide](CONTRIBUTING.md) for detailed instructions on getting started, feature development, and the pull request process. | ||
|
||
We value and appreciate all contributions to MD-Agent. | ||
We value and appreciate all contributions to MDAgent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.