Skip to content

Commit

Permalink
merge main into add_paper_figs
Browse files Browse the repository at this point in the history
  • Loading branch information
qcampbel committed Feb 22, 2025
2 parents 2763eb3 + d284cf6 commit d4f2fdc
Show file tree
Hide file tree
Showing 391 changed files with 1,373,816 additions and 68 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
exclude: ^notebooks/experiments/compare_python_code/llm_only/
- repo: https://github.com/psf/black
rev: "24.10.0"
hooks:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
MDCrow is a LLM-agent based toolset for Molecular Dynamics.
MDCrow is an 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.
To use the OpenMM features in the agent, please set up a conda environment following these steps.
```
conda env create -n mdcrow -f environment.yaml
conda activate mdcrow
```

If you already have a conda environment, you can install dependencies before you activate it with the following step.
If you already have a conda environment, you can install dependencies before you activate it with the following steps.
- Install the necessary conda dependencies: `conda env update -n <YOUR_CONDA_ENV_HERE> -f environment.yaml`


Expand All @@ -20,22 +20,22 @@ pip install git+https://github.com/ur-whitelab/MDCrow.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.
The next step is to set up your API keys in your environment. An API key for an 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 MDCrow to conduct molecular dynamics tasks using OpenAI's GPT model
You can ask MDCrow to conduct molecular dynamics tasks using OpenAI's GPT model.
```
from mdcrow import MDCrow
agent = MDCrow(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 = MDCrow(model="together/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo")`
Note: To distinguish Together models from the rest, you'll need to add the "together\" prefix in the model flag, such as `agent = MDCrow(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:
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 a 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
Expand Down
14 changes: 14 additions & 0 deletions mdcrow/tools/base_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .analysis_tools.bond_angles_dihedrals_tool import ComputeAngles
from .analysis_tools.distance_tools import ContactsTool, DistanceMatrixTool
from .analysis_tools.hydrogen_bonding_tools import HydrogenBondTool
from .analysis_tools.inertia import MomentOfInertia
Expand Down Expand Up @@ -63,6 +64,18 @@
"GetSubunitStructure",
"GetTurnsBetaSheetsHelices",
"GetUniprotID",
"ComputeAngles",
"ComputeChi1",
"ComputeChi2",
"ComputeChi3",
"ComputeChi4",
"ComputeDihedrals",
"ComputeOmega",
"ComputePhi",
"ComputePsi",
"ListRegistryPaths",
"MapPath2Name",
"ModifyBaseSimulationScriptTool",
"ComputeLPRMSD",
"ComputeRMSD",
"ComputeRMSF",
Expand All @@ -79,6 +92,7 @@
"PPIDistance",
"ProteinName2PDBTool",
"RadiusofGyrationTool",
"RamachandranPlot",
"RDFTool",
"RMSDCalculator",
"Scholar2ResultLLM",
Expand Down
2 changes: 2 additions & 0 deletions mdcrow/tools/base_tools/analysis_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .bond_angles_dihedrals_tool import ComputeAngles
from .distance_tools import ContactsTool, DistanceMatrixTool
from .hydrogen_bonding_tools import HydrogenBondTool
from .inertia import MomentOfInertia
Expand All @@ -10,6 +11,7 @@
from .vis_tools import VisFunctions, VisualizeProtein

__all__ = [
"ComputeAngles",
"ComputeLPRMSD",
"ComputeRMSD",
"ComputeRMSF",
Expand Down
Loading

0 comments on commit d4f2fdc

Please sign in to comment.