> For the complete documentation index, see [llms.txt](https://devdocs.olisystems.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devdocs.olisystems.com/chemistry-model-files/chembuilder-api/getting-started-with-chembuilder/add-kinetics.md).

# Add Kinetics

Kinetic reactions and their rate constants can be incorporated into the chemistry file using the "kinetics" field. The OLI Engine supports two types of kinetics: Arrhenius and user-defined. These are derived from the Reaction Kinetics (section 1.11) and Non-standard Rate Law (section 1.11.2) in the OLI Studio user manual.&#x20;

Below is a sample code featuring kinetics.

```json
{
  "params": {
    "thermodynamicFramework": "MSE (H3O+ ion)",
    "modelName": "testModel",
    "phases": [
      "liquid1",
      "vapor",
      "solid",
      "liquid2"
    ],
    "inflows": [
      {
        "name": "H2O"
      },
      {
        "name": "NACL"
      },
      {
        "name": "UREA"
      },
      {
        "name": "NH3"
      },
      {
        "name": "CO2"
      },
      {
        "name": "CACO3"
      },
      {
        "name": "Benzene"
      },
      {
        "name": "Ethanol"
      }
    ],
    "kinetics": {
      "enabled": true,
      "data": [
        {
          "enabled": true,
          "reaction": "2NH3AQ+CO2AQ=UREAAQ+H2O",
          "rateSpecification": "Arrhenius",
          "comment": "decide rate type names std/arrhenious vs user-defined/spec",
          "rateData": [
            {
              "name": "KF",
              "value": 2000.0,
              "enabled": true
            },
            {
              "name": "AR",
              "value": 1.2e-4,
              "enabled": true
            },
            {
              "name": "BR",
              "value": 3480.78
            },
            {
              "name": "ER1",
              "value": 2.0
            },
            {
              "name": "ER2",
              "value": 1.0
            },
            {
              "name": "EP1",
              "value": 1.0
            },
            {
              "name": "EP2",
              "value": 0.0
            }
          ]
        },
        {
          "enabled": true,
          "reaction": "NH3AQ+H2O=NH4ION+OHION",
          "rateSpecification": "user-defined",
          "comment": "decide rate type names std/arrhenious vs user-defined/spec",
          "rateData": [
            {
              "name": "FXRATE",
              "value": "LNH3AQ+ANH3AQ+LH2O+AH2O",
              "enabled": true
            },
            {
              "name": "RXRATE",
              "value": "LNH4ION+ANH4ION+LOHION+AOHION",
              "enabled": true
            },
            {
              "name": "KF1",
              "value": 3.0,
              "enabled": true
            },
            {
              "name": "KR1",
              "value": "KF1/KEQ",
              "enabled": true
            }
          ],
          "rate": "(KF1*EXP(FXRATE)-KR1*EXP(RXRATE))*VOLLIQ/1000"
        }
      ]
    }
  }
}
```

{% hint style="info" %}
Kinetics is an optional field for generating .dbs files.
{% endhint %}

The "`data`" JSON object is always required when utilizing kinetics.&#x20;

| kinetics |    always required   | type        |
| -------- | :------------------: | ----------- |
| data     | :heavy\_check\_mark: | JSON Object |

Within "`data`" object, the following input fields must be included.

| data              |    always required   | type                 |
| ----------------- | :------------------: | -------------------- |
| reaction          | :heavy\_check\_mark: | String               |
| rateSpecification | :heavy\_check\_mark: | String               |
| rateData          | :heavy\_check\_mark: | Array of JSON Object |

{% hint style="info" %}
Please refer to section 1.11, "Reaction Kinetics," and section 1.11.2, "Non-standard Rate Law," in the OLI Studio manual for more information on reactions and user-defined equations.
{% endhint %}

{% hint style="info" %}
Refer to [Kinetics Query](/chemistry-model-files/chembuilder-api/chembuilder-query/kinetics-query.md) for information on species and equilibrium reactions.
{% endhint %}

{% hint style="info" %}
In the "rateSpecification", either "Arrhenius" for standard rate law or "user-defined" for non-standard rate law is required.
{% endhint %}

{% hint style="info" %}
Kinetics and its internal JSON objects can be enabled or disabled using ["enabled" Keyword](/chemistry-model-files/chembuilder-api/supporting-information-for-chembuilder/enabled-keyword.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devdocs.olisystems.com/chemistry-model-files/chembuilder-api/getting-started-with-chembuilder/add-kinetics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
