# Mother Nature Commands Software

This API is designed as an explanation of _all_ commands that our prototype AI chat bot is capable of understanding. Only some of these commands may be available to users depending on their authentication.  The following commands apply only if you have downloaded our software from our [GitHub](https://github.com/Global-Chem/Mother-Nature). If you are using Discord to communicate with Mother Nature, follow the[ Mother Nature Commands Discord](https://app.gitbook.com/o/U3oW5ba3AWKBq36mu5Zf/s/UFBeNNwBvVGQNPAGsPBs/~/changes/1/mother-nature-api/mother-nature-commands-discord) API page.&#x20;

## **Get the current list of commands**

Get the list of all commands.&#x20;

{% tabs %}
{% tab title="Code" %}
```
commands()
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FBl4FvifNRrR9XXzmvzPH%2Fimage.png?alt=media\&token=cff357e2-ed90-4b14-8ed5-85ccf5d0dc95)
{% endtab %}
{% endtabs %}

## **Check Whether a molecule is safe as a Color Additive**

Compares the given chemical to the FDA Color Additive Status List.

{% tabs %}
{% tab title="Code" %}
```
is_color_legal(chemical_name)
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2F5Jk8Wx35KlV55bGnIls0%2Fimage.png?alt=media\&token=61eee6fa-3f93-4810-8f29-195eadaa09e8)

![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FFaahoXwHU1Cwkgoizvxz%2Fimage.png?alt=media\&token=7ca82567-bdf3-4513-9ae9-60e67beaea14)
{% endtab %}
{% endtabs %}

**Parameters:**

* `chemical_name`(<mark style="color:purple;">string</mark>) : The name of a chemical.

## **Check Whether a molecule is safe as FDA Color Additive**

Checks if any color additives have changed in the FDA Color Additive Status List.

{% tabs %}
{% tab title="Code" %}
```
check_fda_color_status()
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FZMUmPSxB7qykgNTw2Ew8%2Fimage.png?alt=media\&token=a070e574-e4b2-4059-ab7c-5152317d682f)
{% endtab %}
{% endtabs %}

## **Remove Smiles from the Chemical Training List**

Removes the SMILE at the given index in the given chemical training list.

{% tabs %}
{% tab title="Code" %}
```
remove_smile_file(smile_index, categories)
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FdPAHRjXjG3ElGPUzDzqZ%2Fimage.png?alt=media\&token=a4dc0cbf-548c-4b71-ba9d-87d6ea96cdba)
{% endtab %}
{% endtabs %}

**Parameters:**

* `smile_index`(<mark style="color:purple;">int</mark>) : A number corresponding to the location of a SMILES in the given chemical training list. These training lists can be found by using `fetch_training_set(`categories`)` or by manually looking in our [GitHub ](https://github.com/Global-Chem/ForbiddenFruit/tree/main/chemical_universes)repository.
* `categories`(<mark style="color:purple;">string</mark>) : The name(s) of the category(s) for the training list(s).&#x20;

## **Add Smiles to the Chemical Training List**

Appends the given SMILE to the given chemical training list.

{% tabs %}
{% tab title="Code" %}
```
add_smile_file(smile, categories)
```
{% endtab %}

{% tab title="Output" %}

{% endtab %}
{% endtabs %}

**Parameters:**

* `smile`(<mark style="color:purple;">string</mark>) : A **valid** SMILES. See here for help with SMILES.
* `categories`(<mark style="color:purple;">string</mark>) : The name(s) of the category(s) for the training list(s).&#x20;

## **Rerun Training for Deep Learning**

Retrains the Mother Nature bot in the given chemical category.

{% tabs %}
{% tab title="Code" %}
```
retrain_mother_nature(channel_name, retrain_again)
```
{% endtab %}

{% tab title="Output" %}

{% endtab %}
{% endtabs %}

**Parameters:**

* `channel_name`(<mark style="color:purple;">string</mark>) (optional) :  The name(s) of the category(s) to be retrained. If no input is given will default to the name of the channel the command is used it.
* `retrain_again`(<mark style="color:purple;">bool</mark>) : If true, then the given category(s) will retrain every 7 days.

## **Generate Chemicals For Different Categories - Lorax** <a href="#generate-chemicals-for-different-categories" id="generate-chemicals-for-different-categories"></a>

Generates new chemicals in the given category(s). **Cannot** generate chemicals for war, narcotics, and performance enhancements categories.

{% tabs %}
{% tab title="Code" %}
```
make_github_issue_lorax(channel_name, categories)
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FKiW9KMGrb3uYZgEl57GY%2Fimage.png?alt=media\&token=a6b08e3e-bae3-4071-b7ce-4f0de3310a8a)

![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FXqaE91dSUdSAl3y320K9%2Fimage.png?alt=media\&token=65212ca4-87d1-4bbf-ada3-3257f172c71e)
{% endtab %}
{% endtabs %}

**Parameters:**

* `categories`(<mark style="color:purple;">string</mark>) : The name(s) of the category(s) for the new chemicals.&#x20;

## **Generate Chemicals For Different Categories - Arbiter** <a href="#generate-chemicals-for-different-categories-1" id="generate-chemicals-for-different-categories-1"></a>

Generates new chemicals in the given category(s). **Can** generate chemicals for war, narcotics, and performance enhancements categories.

{% tabs %}
{% tab title="Code" %}
```
make_github_issue_arbiter(channel_name, categories)
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FTVOgnPY36lDzBK30KdmJ%2Fimage.png?alt=media\&token=b6059ad2-3f85-47a9-b692-1090becaa18f)

![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2FfyosXPnpwJpbGJJ4BBS4%2Fimage.png?alt=media\&token=6463085c-bc1f-48c1-8d43-f660e7877cbe)
{% endtab %}
{% endtabs %}

**Parameters:**

* `categories`(<mark style="color:purple;">string</mark>) : The name(s) of the category(s) for the new chemicals.&#x20;

## **Create a Graph Node in GlobalChem** <a href="#create-a-graph-node-in-globalchem" id="create-a-graph-node-in-globalchem"></a>

Creates a new node in the Global Chem repository.

{% tabs %}
{% tab title="Code" %}
```
create_graph_node(node_class_name, text_message)
```
{% endtab %}

{% tab title="Output" %}
![](https://1108208354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFBeNNwBvVGQNPAGsPBs%2Fuploads%2Fn6o2fkQbV7tiI2hoTBxk%2Fimage.png?alt=media\&token=da880600-bb24-4fbe-b1bd-34dd93650d22)
{% endtab %}
{% endtabs %}

**Parameters:**

* `node_class_name`(<mark style="color:purple;">string</mark>) : The name of the node.
* `text_message`(<mark style="color:purple;">string</mark>) : The list of chemicals to be added to the node.

## **Fetch the Training Set Used in Retraining** <a href="#fetch-the-training-set-used-in-retraining" id="fetch-the-training-set-used-in-retraining"></a>

Gets the training set from the specified category.

{% tabs %}
{% tab title="Code" %}
```
fetch_training_set(categories)
```
{% endtab %}
{% endtabs %}

**Parameters:**

* `categories`(<mark style="color:purple;">string</mark>) : The name(s) of the category(s) for the training list(s).&#x20;
