domains / science / brenda-enzyme-kinetics-query / brenda-database

brenda-database

Skill card

combined

Both copies describe the same BRENDA SOAP workflow, but each contains material steps the other lacks. The aipoch copy defines the concrete runtime contract (zeep/requests, BRENDA_EMAIL/BRENDA_PASSWORD, scripts/brenda_queries.py, BrendaClient, response delimiter parsing, validation/failure handling). The FreedomIntelligence copy adds a richer query surface (organism/substrate filters, reaction search, enzyme discovery by substrate/product/pattern, cross-organism comparison, environmental parameters, cofactors, substrate specificity) and parsing helpers. Crowning one would hide either the operational setup or the expanded query capabilities.

Repositories

RepositoryPath
aipoch/medical-research-skillsscientific-skills/Evidence Insight/brenda-database/SKILL.md
FreedomIntelligence/OpenClaw-Medical-Skillsskills/brenda-database/SKILL.md

Other copies

RoleRepositoryPath
peeraipoch/medical-research-skillsscientific-skills/Evidence Insight/brenda-database/SKILL.md
peerFreedomIntelligence/OpenClaw-Medical-Skillsskills/brenda-database/SKILL.md

Combined skill

---
name: brenda-database
description: Programmatic access to the BRENDA enzyme database via the SOAP API for kinetic constants, reaction equations, enzyme properties, and enzyme discovery.
license: MIT
---

## When to Use
- You need kinetic parameters (Km, kcat, Vmax) for an enzyme, organism, or EC number.
- You need reaction equations or stoichiometry by EC number or enzyme name.
- You need enzyme properties such as optimal pH/temperature, stability, inhibitors, activators, or cofactors.
- You want to discover enzymes by substrate, product, reaction pattern, or EC number.
- You want to compare enzyme properties across organisms or automate BRENDA retrieval in a Python pipeline.

## Dependencies
- Python 3.x
- zeep (SOAP client)
- requests

Install:
```bash
uv pip install zeep requests
```

## Credentials
Set BRENDA credentials in the environment or a .env file:
```bash
export BRENDA_EMAIL="your_email@example.com"
export BRENDA_PASSWORD="your_password"
```

## Setup
Use the provided script `scripts/brenda_queries.py` and its `BrendaClient` class. Initialize the client with the credentials from the environment:
```python
import os
from scripts.brenda_queries import BrendaClient

client = BrendaClient(
    email=os.environ["BRENDA_EMAIL"],
    password=os.environ["BRENDA_PASSWORD"],
)
```

## Core Queries

### Kinetic Parameters
Retrieve Km values by EC number, optionally filtered by organism or substrate:
```python
km_records = client.get_km_values(ec_number="1.1.1.1")
km_records = client.get_km_values(ec_number="1.1.1.1", organism="Saccharomyces cerevisiae")
km_records = client.get_km_values(ec_number="1.1.1.1", substrate="ethanol")
```

### Reaction Information
Retrieve reactions by EC number, optionally filtered by organism or reaction pattern:
```python
reactions = client.get_reactions(ec_number="1.1.1.1")
reactions = client.get_reactions(ec_number="1.1.1.1", organism="Escherichia coli")
reactions = client.get_reactions(ec_number="1.1.1.1", reaction="ethanol + NAD+")
```

### Enzyme Discovery
Search enzymes by substrate, product, or reaction pattern:
```python
enzymes = client.search_enzymes_by_substrate("glucose", limit=20)
enzymes = client.search_enzymes_by_product("lactate", limit=10)
enzymes = client.search_by_pattern("oxidation", limit=15)
```

### Organism-Specific Data
Compare enzyme properties across organisms or list organisms for an enzyme:
```python
organisms = ["Escherichia coli", "Saccharomyces cerevisiae", "Homo sapiens"]
comparison = client.compare_across_organisms("1.1.1.1", organisms)

organisms_with_enzyme = client.get_organisms_for_enzyme("6.3.5.5")
```

### Environmental Parameters and Cofactors
Retrieve optimal conditions, stability, and cofactor requirements:
```python
params = client.get_environmental_parameters("1.1.1.1")
cofactors = client.get_cofactor_requirements("1.1.1.1")
```

### Substrate Specificity
Retrieve substrate preference data:
```python
specificity = client.get_substrate_specificity("1.1.1.1")
```

## Response Parsing
BRENDA SOAP responses are often single delimited strings containing multiple records and fields (e.g., `organism*E. coli#value*...`). The script is responsible for:
- Splitting records into entries
- Extracting key/value fields
- Normalizing parsed results into Python-friendly structures (dicts/lists)

Use the provided parsing helpers when available:
```python
from scripts.brenda_queries import parse_km_entry, extract_organism_data, parse_reaction_entry, extract_substrate_products
```

## Output Contract
- Return structured Python objects suitable for downstream filtering by organism, literature reference, conditions, etc.
- If a file is produced, prefer a deterministic output name such as `brenda_database_result.md` unless a better convention is defined.
- Include a short validation summary describing what was checked, assumptions made, and remaining limitations.

## Validation and Safety Rules
- Validate required inputs before execution and stop early when mandatory fields, files, or credentials are missing.
- Do not fabricate measurements, references, findings, or conclusions not supported by BRENDA data.
- Emit a clear warning when credentials, privacy constraints, safety boundaries, or unsupported requests affect the result.
- Keep the output safe, reproducible, and within the documented scope.

## Failure Handling
- If validation fails, explain the exact missing field, file, or parameter and show the minimum fix required.
- If an external dependency or script fails, surface the command path, likely cause, and the next recovery step.
- If partial output is returned, label it clearly and identify which checks could not be completed.

## Conflicts
- aipoch/medical-research-skills specifies zeep, requests, BRENDA_EMAIL/BRENDA_PASSWORD, and a BrendaClient class; FreedomIntelligence/OpenClaw-Medical-Skills shows imports from brenda_client and scripts.brenda_queries without specifying the credential environment variables or the zeep dependency. Use the aipoch credential and dependency setup as the operational baseline.
- FreedomIntelligence/OpenClaw-Medical-Skills includes discovery, comparison, environmental, cofactor, and substrate-specificity functions not present in the aipoch copy; the aipoch copy documents only get_km_values and get_reactions with a pointer to references/api_reference.md. Use the FreedomIntelligence function names as the extended query surface when those methods are available in the deployed script.