---
title: enzymeml
sidebarTitle: enzymeml
---

# `catalax.model.enzymeml`

## Functions

### `from_enzymeml` <sup><a href="https://github.com/JR-1991/Catalax/blob/master/catalax/model/enzymeml.py#L14" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
from_enzymeml(cls: Type[Model], enzmldoc: pe.EnzymeMLDocument, name: str | None = None) -> Model
```


Convert a PyEnzyme EnzymeMLDocument to a Catalax Model.

This function creates a Catalax model from an EnzymeML document, supporting both
direct ODE conversion and reaction-based conversion. The resulting model includes
all species, parameters, and equations from the original document.

The conversion process:
1. Extracts all species from the document (small molecules, proteins, complexes)
2. Determines which species are observable based on measurement data
3. Imports reactions and converts them to ODEs if present
4. Imports direct ODE specifications if present
5. Transfers parameter values and bounds from the document
6. Cleans up unused species to maintain a minimal model

**Args:**
- `cls`: The Model class to instantiate (catalax.model.Model)
- `enzmldoc`: The EnzymeML document to convert
- `name`: Optional name for the model. If None, uses the document's name

**Returns:**
- A Catalax Model instance containing all species, parameters, and equations
- from the EnzymeML document.

**Raises:**
- `ValueError`: If reactions are missing kinetic laws when from_reactions=True
- `AssertionError`: If a parameter from the document is not found in the model

