agentleFS
PharMolixPharMolix/OpenBioMed/CLAUDE.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the PharMolix/OpenBioMed repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

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.

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
  1. Distinctive:

    Create entities using factory methods:

    line 75
  2. Very specific:

    Create task class in open_biomed/tasks/ extending BaseTask

    line 146
  3. Very specific:

    Create dataset class in open_biomed/datasets/

    line 148
  4. Very specific:

    Add model support in MODEL_REGISTRY in models/__init__.py

    line 149
  5. Very specific:

    Create tool class extending Tool in open_biomed/tools/

    line 152
  6. Very specific:

    Add to available_tools() list

    line 154
  7. Very specific:

    Create model class in appropriate subdirectory under models/

    line 157
  8. Very specific:

    Add config file in configs/model/

    line 158

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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/DATASET

Testing/Evaluation

./scripts/test.sh TASK MODEL DATASET GPU_ID

Inference

python open_biomed/scripts/inference.py --task TASK_NAME

Running 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 8083

Architecture

Core Directories

  • open_biomed/data/: Data structures for Molecule, Protein, Pocket, Cell, Text entities
  • open_biomed/models/: Model implementations organized by type
    • foundation_models/: BioT5, MolT5, PharmolixFM, BioMedGPT, etc.
    • task_models/: Task-specific model wrappers
    • protein/, molecule/, cell/: Domain-specific models
  • open_biomed/tasks/: Task definitions
    • aidd_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/: Infrastructure
    • pipeline.py: TrainValPipeline, InferencePipeline for training/inference
    • workflow.py: DAG-based workflow execution
    • agent.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 classes
  • MODEL_REGISTRY (models/init.py): Maps task names to available models
  • TOOLS (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: 1

Workflows 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

TaskAvailable Models
molecule_property_predictiongraphmvp, graphmvp_regression
molecule_question_answeringmolt5, biot5, biot5_plus
protein_question_answeringmolt5, biot5, biot5_plus
text_based_molecule_editingmolt5, biot5, biot5_plus, llm4molopt
structure_based_drug_designpharmolix_fm, molcraft
pocket_molecule_dockingpharmolix_fm
mutation_explanationmutaplm
mutation_engineeringmutaplm
protein_foldingesmfold
cell_annotationlangcell

Model Checkpoints

Model checkpoints are stored in ./checkpoints/. Pre-trained models are available:

Coding Patterns

Adding a New Task

  1. Create task class in open_biomed/tasks/ extending BaseTask
  2. Register in TASK_REGISTRY in tasks/__init__.py
  3. Create dataset class in open_biomed/datasets/
  4. Add model support in MODEL_REGISTRY in models/__init__.py

Adding a New Tool

  1. Create tool class extending Tool in open_biomed/tools/
  2. Register in LazyDictForTool in tools/tool_registry.py
  3. Add to available_tools() list

Adding a New Model

  1. Create model class in appropriate subdirectory under models/
  2. Add config file in configs/model/
  3. Register in MODEL_REGISTRY mapping to relevant tasks

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.