Skip to content

Commit

Permalink
merged from main into 'exp_code_changes' and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
qcampbel committed Feb 22, 2025
2 parents 606f62b + dde6e22 commit 5a49c96
Show file tree
Hide file tree
Showing 392 changed files with 1,376,209 additions and 74 deletions.
3 changes: 2 additions & 1 deletion .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 All @@ -34,4 +35,4 @@ repos:
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--exclude-files, ".github/workflows/"]
args: [--exclude-files, ".github/workflows/", --exclude-files, '.*\.ipynb$']
18 changes: 8 additions & 10 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,29 +20,27 @@ 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.
We recommend setting up api keys in a .env file. You can use the provided .env.example file as a template.
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.
We recommend setting up the API 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


## Contributing

We welcome contributions to MDCrow! 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 MDCrow.
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 5a49c96

Please sign in to comment.