OpenBioMed
CLAUDE.md1.1k starsChanged 8 months agoMITView on GitHub
OpenBioMed is a Python deep learning toolkit for AI-empowered biomedicine. It provides flexible APIs for multi-modal biomedical data (molecules, proteins, pockets, cells, text) and includes 20+ tools for downstream applications including drug discovery, protein engineering, and multi-modal reasoning. Workflows are loaded from memory/workflows/ and executed via Workflow class.
- Installs packages
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about PharMolix/OpenBioMed
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
In this repository45 other files it gives its agents.
- admet-predictionSkill
- antibody-design-iggmSkill
- antibody-structure-prediction-tfoldSkill
- binding-affinity-prediction-prodigySkill
- biomedical-literature-searchSkill
- biomed-skill-creatorSkill
- biomed-skill-routerSkill
- cellxgene-census-querySkill
- chembl-querySkill
- disease-drug-intelligenceSkill
- drug-candidate-discoverySkill
- drug-drug-interaction-analysisSkill
- drug-lead-analysisSkill
- functional-protein-designSkill
- iupac-name-identification-biot5Skill
- kegg-querySkill
- molecule-biochemical-significance-query-biot5Skill
- mutation-design-aavSkill
- mutation-design-gfpSkill
- ppi-string-querySkill
- protein-function-predictionSkill
- protein-ligand-binding-analysis-plipSkill
- protein-mutation-analysisSkill
- protein-structure-design-boltzgenSkill
- protein-subcellular-localization-prediction-biot5Skill
- pubchem-querySkill
- retrosynthesis-planningSkill
- similar-protein-retrievalSkill
- single-cell-atac-seq-peak-calling-annotaionSkill
- single-cell-atac-seq-qc-processingSkill
- single-cell-foundation-model-geneformerSkill
- single-cell-foundation-model-langcellSkill
- single-cell-foundation-model-scgptSkill
- single-cell-multi-omics-analysis-scviSkill
- single-cell-multi-omics-data-harmonizationSkill
- single-cell-proteomics-data-processingSkill
- single-cell-proteomics-peptide-identificationSkill
- single-cell-scrna-seq-analysis-scanpySkill
- single-cell-foundation-model-stofmSkill
- spatial-transcriptomics-spatial-data-ioSkill
- structure-prediction-boltz-2Skill
- target-based-lead-designSkill
- target-drug-reportSkill
- text-based-molecule-editingSkill
- uniprot-querySkill
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 75
Create entities using factory methods:
- Very specific: line 146
Create task class in open_biomed/tasks/ extending BaseTask
- Very specific: line 148
Create dataset class in open_biomed/datasets/
- Very specific: line 149
Add model support in MODEL_REGISTRY in models/__init__.py
- Very specific: line 152
Create tool class extending Tool in open_biomed/tools/
- Very specific: line 154
Add to available_tools() list
- Very specific: line 157
Create model class in appropriate subdirectory under models/
- Very specific: line 158
Add config file in configs/model/
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
OpenBioMed is a Python deep learning toolkit for AI-empowered biomedicine. It provides flexible APIs for multi-modal biomedical data (molecules, proteins, pockets, cells, text) and includes 20+ tools for downstream applications including drug discovery, protein engineering, and multi-modal reasoning.
Key Commands
Environment Setup
conda create -n OpenBioMed python=3.9
conda activate OpenBioMed
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.13.1+cu117.html
pip install pytorch_lightning==2.0.8 peft==0.9.0 accelerate==1.3.0 --no-deps
pip install -r requirements.txt
pip install -e .Training
# Using shell script
./scripts/train.sh TASK MODEL DATASET GPU_ID
# Using Python directly
python open_biomed/scripts/train.py \
--task TASK \
--additional_config_file configs/model/MODEL.yaml \
--dataset_name DATASET \
--dataset_path ./datasets/TASK/DATASETTesting/Evaluation
./scripts/test.sh TASK MODEL DATASET GPU_IDInference
python open_biomed/scripts/inference.py --task TASK_NAMERunning Server
python -m uvicorn open_biomed.scripts.run_server:app --host 0.0.0.0 --port 8082
python -m uvicorn open_biomed.scripts.run_server_workflow:app --host 0.0.0.0 --port 8083Architecture
Core Directories
open_biomed/data/: Data structures forMolecule,Protein,Pocket,Cell,Textentitiesopen_biomed/models/: Model implementations organized by typefoundation_models/: BioT5, MolT5, PharmolixFM, BioMedGPT, etc.task_models/: Task-specific model wrappersprotein/,molecule/,cell/: Domain-specific models
open_biomed/tasks/: Task definitionsaidd_tasks/: Drug discovery tasks (property prediction, docking, drug design)multi_modal_tasks/: QA, captioning, translation tasks
open_biomed/tools/: Tool implementations (visualization, web requests, property calculators)open_biomed/core/: Infrastructurepipeline.py:TrainValPipeline,InferencePipelinefor training/inferenceworkflow.py: DAG-based workflow executionagent.py: LangGraph-based LLM agent system
configs/: YAML configurations for models, datasets, workflows, visualization
Key Registries
TASK_REGISTRY(tasks/init.py): Maps task names to task classesMODEL_REGISTRY(models/init.py): Maps task names to available modelsTOOLS(tools/tool_registry.py): Lazy-loaded dictionary of available tools
Data Entities
Create entities using factory methods:
from open_biomed.data import Molecule, Protein, Pocket, Text
molecule = Molecule.from_smiles("CC(=O)OC1=CC=CC=C1C(=O)O")
molecule = Molecule.from_sdf_file("ligand.sdf")
protein = Protein.from_fasta("MKFLILLFNILCLFPVLAADNH...")
protein = Protein.from_pdb_file("protein.pdb")
pocket = Pocket.from_protein_ref_ligand(protein, ligand)
text = Text.from_str("Describe this molecule")Configuration System
- Uses YAML files with variable substitution (
!SUB ${var}) - Config files in
configs/model/,configs/dataset/,configs/workflow/ - Merge configs using
merge_config()for hierarchical configuration
Workflow System
Workflows are defined in YAML with a DAG structure:
tools:
- name: molecule_name_request
inputs:
accession: aspirin
- name: molecule_question_answering
inputs:
text: What is this molecule?
edges:
- start: 0
end: 1Workflows are loaded from memory/workflows/ and executed via Workflow class.
Inference Pipeline
from open_biomed.core.pipeline import InferencePipeline
pipeline = InferencePipeline(
task="molecule_property_prediction",
model="graphmvp",
model_ckpt="./checkpoints/model.ckpt",
device="cuda:0"
)
outputs = pipeline.run(molecule=molecule)Available Tasks and Models
| Task | Available Models |
| molecule_property_prediction | graphmvp, graphmvp_regression |
| molecule_question_answering | molt5, biot5, biot5_plus |
| protein_question_answering | molt5, biot5, biot5_plus |
| text_based_molecule_editing | molt5, biot5, biot5_plus, llm4molopt |
| structure_based_drug_design | pharmolix_fm, molcraft |
| pocket_molecule_docking | pharmolix_fm |
| mutation_explanation | mutaplm |
| mutation_engineering | mutaplm |
| protein_folding | esmfold |
| cell_annotation | langcell |
Model Checkpoints
Model checkpoints are stored in ./checkpoints/. Pre-trained models are available:
- PharmolixFM: https://cloud.tsinghua.edu.cn/f/8f337ed5b58f45138659/
- BioMedGPT-R1: https://huggingface.co/PharMolix/BioMedGPT-R1
- Other models: See README.md for download links
Coding Patterns
Adding a New Task
- Create task class in
open_biomed/tasks/extendingBaseTask - Register in
TASK_REGISTRYintasks/__init__.py - Create dataset class in
open_biomed/datasets/ - Add model support in
MODEL_REGISTRYinmodels/__init__.py
Adding a New Tool
- Create tool class extending
Toolinopen_biomed/tools/ - Register in
LazyDictForToolintools/tool_registry.py - Add to
available_tools()list
Adding a New Model
- Create model class in appropriate subdirectory under
models/ - Add config file in
configs/model/ - Register in
MODEL_REGISTRYmapping to relevant tasks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

