Skip to content

MauricioCafiero/MoDrAg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoDrAg

A Modular Drug-design AI Agent. See the descption of the Agent's abilities, the design philosphy, a description of all the files in this repo, or some sample images below.

Find a working demo of MoDrAg on HuggingFace Spaces!

Use MoDrAg's tools with OpenAI models with Modrag Chat

See the MoDrAg demo video!

Abilities:

A nicely featured drug-design pipeline with voice reposponse, including:

Premium Features

  • Dock a molecule in a protein using AutoDock Vina, get the score and the pose.
  • Use LightGBM to create a model to predict IC50 values of novel molecules. Trains itself using a Chembl Dataset which Modrag can find for you.
  • Use a GPT, finetuned on a Chembl dataset (found by MoDrAg), to generate novel ligands for a protein.
*these features will take a bit longer than the standards features. The last two require a Chembl dataset ID, which you can find using modrag.

Standard Features

  • Find Uniprot IDs for a protein,
  • Find Chembl IDs for a given Uniprot ID,
  • Find bioactive molecules for a given Chembl ID,
  • Find PDB IDs for a given protein,
  • Find sequences, ligand and numbers of chains for a PDB ID.
  • Get SMILES strings for molecules, or
  • get names for SMILES strings.
  • Search Pubchem for similar molecules or generate analogues.
  • Find Lipinski properties of molecules.
  • Find pharmacophore overlap between two molecules.

Speech-to-text provided by a generous donation from Eleven Labs.

Philosophy

  • Everything ‘open,' avoiding using paid services, i.e. not using the OpenAI or Anthropic APIs, etc. where possible.
  • Modular sub-Agents each perform a family of tasks, easily upgradeable.
  • Hardwire tool and Agent calls into the Graph – meaning that you can plug in any AI/LLM; it does not have to be trained to call tools.
  • Use a small LM (~4B parameters) to save GPU/CPU for sub-agents performing calculations.
    • HuggingFace’s smolLM has trouble parsing the chemistry
    • Microsoft’s Phi4-mini-instruct works well!
    • Looking to try IBM’s Granite 4 Nano!

Files:

  • MoDrAg_HFS.py: complete app for the Drug design agent. Upload to HuggingFace spaces and rename app.py.
  • MoleculeAgent_HFS.py, PropAgent_HFS.py, ProteinAgent_HFS.py, DockAgent_HFS.py: sub-Agents for carrying out various tasks. Also ready to upload to a Hugginface space and rename as app.py.
  • Various requirements.txt files: the requirements for each of the Agents.
  • Agent_template.py: populate this file with one or more tools, add tool descriptions, and add the tools to the Graph and this file can be uploaded to a HuggingFace Space and serve as an Agent or MCP immediately.
  • node_template.py: this inlcudes templates for adding your agent as a sub-agent to MoDrAg, code for adding your agent description to the Gradio GUI, and step-by-step directions on how to add all of the bits needed to integrate the new agent into the Graph.

Images:

Agent GUI:

image

Chat GUI

image

Agent workflow:

image

SubAgent workflow:

image

About

A modular drug-design AI Agent

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages