# Chemistry information

This function is used to obtain useful chemistry information that is based on the chemistry model file chosen. The output of this function can be for the most part used to determine the inflows required to craft the input for other OLI calculations.&#x20;

## chemistry information

<mark style="color:blue;">`GET`</mark> `https://api.olisystems.com/engine/file/{dbs_file_id}/chemistry-info`

get information on the inflows, species and thermodynamic framework for a given chemistry model

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Bearer {access\_token} |

{% tabs %}
{% tab title="200 Please look at the "API call blueprint" page on how to obtain results" %}

```
{
	"code": 200,
	"data": {
		"file_id": "dee854a6-59db-487d-ad08-a20dee691133",
		"jobId": "f6b3375e-cd0f-4ace-a5ee-71e047b76754",
		"resultsLink": "https://devapi.olisystems.com/result/flash/f6b3375e-cd0f-4ace-a5ee-71e047b76754?context=engine",
		"status": "IN PROGRESS"
	},
	"message": "Process execution started Successfully",
	"status": "SUCCESS"
}
```

{% endtab %}
{% endtabs %}

### Response (status = PROCESSED)

```javascript
{
    "data": {
        "result": {
            "inflows": [
                {
                    "baseName": "H2O",
                    "mw": 18.01533
                },
                {
                    "baseName": "CO2",
                    "mw": 44.00991
                },
                {
                    "baseName": "BENZENE",
                    "mw": 78.11442
                },
                {
                    "baseName": "HCL",
                    "mw": 36.46097
                },
                ...<snip>...
            ],
            "species": [
                {
                    "baseName": "H2O",
                    "charge": 0.0,
                    "mw": 18.01533,
                    "phase": "liquid",
                    "trueName": "H2O"
                },
                {
                    "baseName": "H2O",
                    "charge": 0.0,
                    "mw": 18.01533,
                    "phase": "vapor",
                    "trueName": "H2OVAP"
                }
                {
                    "baseName": "H2O",
                    "charge": 0.0,
                    "mw": 18.01533,
                    "phase": "solid",
                    "trueName": "H2OPPT"
                },
                {
                    "baseName": "NA2CO3",
                    "charge": 0.0,
                    "mw": 105.98924,
                    "phase": "solid",
                    "trueName": "NA2CO3PPT"
                },
                {
                    "baseName": "NA3HCO32",
                    "charge": 0.0,
                    "mw": 189.99648000000002,
                    "phase": "solid",
                    "trueName": "NA3HCO32PPT"
                },
                {
                    "baseName": "NA5H3CO34",
                    "charge": 0.0,
                    "mw": 358.01096,
                    "phase": "solid",
                    "trueName": "NA5H3CO34PPT"
                },
                ...<snip>...
            ],
            "thermodynamicFramework": "MSE"
        }
    },
    "message": "Results returned successfully",
    "status": "PROCESSED"
}
```

There may be more inflows generated here than that was specified during the chemistry model generation stage. These extra inflows are called "related inflows", as they are the other possible inflows that can be formed from the combination of individual material species that formed the original inflows.

The response contains two main keys i.e. the **result.inflows** and **result.species**. Both are array type objects. Their values are described below

| data.result.inflows[\[ { } \] ](/terms-definition.md) | type   | description      |
| ----------------------------------------------------- | ------ | ---------------- |
| baseName                                              | string | name of inflow   |
| mw                                                    | number | molecular weight |

| data.result.species[\[ { } \]](/terms-definition.md) | type   | value                         |
| ---------------------------------------------------- | ------ | ----------------------------- |
| baseName                                             | string | species name                  |
| trueName                                             | string | name of species with suffix   |
| mw                                                   | number | molecular weight              |
| charge                                               | number | species charge                |
| phase                                                | string | phase in which species exists |

{% hint style="warning" %}
if a species exists in **"aqeuous"** phase, this means it can be present in **liquid1** and/or **liquid2** phases
{% endhint %}

### Description of "trueName"&#x20;

OLI's species naming scheme internally attaches a suffix at the end of species name to indicate the type of species.&#x20;

| suffix | species type            | possible phases  |
| ------ | ----------------------- | ---------------- |
| AQ     | molecular (neutral)     | liquid1, liquid2 |
| ION    | ionic (charged)         | liquid1, liquid2 |
| PPT    | precipitate             | solid            |
| .nH2O  | hydrate                 | solid            |
| SOL    | surface species         | surface          |
| CPI    | surface ionic species   | surface          |
| CPM    | surface neutral species | surface          |

{% hint style="info" %}
The only exception is H2O species, it does not have a suffix and is understood to be in the aqueous phase and/or the second liquid phase.&#x20;
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://devdocs.olisystems.com/group1/api-functions/chemistry-info.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
