# "enabled" Keyword

The "enabled" keyword appears in multiple Chemistry Builder JSON objects, facilitating quick toggling of properties or options without the need to create or delete JSON objects explicitly, thereby reducing parameter tuning efforts. Here are guidelines, examples, and exceptions for its usage:

* The "enabled" keyword must be a Boolean type, accepting only true or false.
* It must be enclosed within "{ }" in a JSON object.
* When set to 'true', the input within the JSON object is processed.
* When set to 'false', the input within the JSON object is disregarded.
* If the "enabled" keyword is absent, the JSON object is processed by default.
* If the "enabled" field contains values other than 'true' or 'false', the JSON object is still processed.

{% tabs %}
{% tab title="Inflow Example 1" %}

```json
{
    	"inflows": [
		{
			"name": "H2O", 
			"enabled": true 
		},
		{
			"name": "NACL",
			"enabled": false
		},
		{ 
			"name": "CO2", 
		} ]
} 
```

In this example, "H2O" and "CO2" are included as inflow species, whereas "NaCl" is excluded.
{% endtab %}

{% tab title="Inflow Example 2" %}

```json
{
    	"inflows": [
		{
			"name": "H2O", 
		},
		{
			"name": "NACL",
		},
		{ 
			"name": "CO2", 
			"enabled": "true"
			
		} ]
}
```

The "enabled" field for CO2 is assigned a string value instead of a boolean value. However, CO2 will still be added as an input despite the incorrect data type.
{% endtab %}

{% tab title="Redox Example 3" %}

```json
  "redox": {
        "enabled": false,
        "subSystems": [
            {
                "name": "Chlorine",
                "enabled": true,
                "valenceStates": [
                    {
                        "name": "Cl(-1)",
                        "enabled": true
                    },
                    {
                        "name": "Cl(+1)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+3)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+5)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+7)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+4)",
                        "enabled": false
                    }
                ]
            }
        ]
    }
    
        
```

In this example, "redox" is disabled, resulting in the exclusion of everything within the object.
{% endtab %}

{% tab title="Redox Example 4" %}

```json
    "redox": {
        "enabled": true,
        "subSystems": [
            {
                "name": "Chlorine",
                "enabled": true,
                "valenceStates": [
                    {
                        "name": "Cl(-1)",
                        "enabled": true
                    },
                    {
                        "name": "Cl(+1)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+3)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+5)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+7)",
                        "enabled": false
                    },
                    {
                        "name": "Cl(+4)",
                        "enabled": false
                    }
                ]
            }
        ]
    }
```

In this example, "redox" and "Chlorine" are enabled, with only the "Cl (-1)" valence state being active. All other valence states are ignored.
{% endtab %}

{% tab title="Redox Example 5" %}

```json
 {   
	"params": {
	"thermodynamicFramework": "MSE (H3O+ ion)",
	"privateDatabanks": [
	],
	"modelName": "quickTest",
	"inflows": [
		{ 
			"name": "H2O"
		} ,	
		{
			"name": "NACL"
		},
		{
			"name": "CO2"
		},
		{
			"name": "BENZENE"
		},
		{ 
			"name": "ETHANOL" 
		}
		],
	"phases": [
		"liquid1",
		"vapor",
		"solid",
		"liquid2"
	],
	"redox": {
		"enabled": true,
		"subSystems": [
			{
				"name":"Carbon", 
				"enabled": true
			}, 
			{
				"name": "Chlorine",
				"enabled": false,
				"valenceStates": [
					{
						"name": "Cl(-1)",
						"enabled": true
					},
					{
						"name": "Cl(+1)",
						"enabled": true
					},					
					{
						"name": "Cl(+3)",
						"enabled": false
					},
					{
						"name": "Cl(+5)",
						"enabled": false
					},
					{
						"name": "Cl(+7)",
						"enabled": false
					}
	
				]
			}
		] 
	} 
	}
 }


```

In this example:

* Carbon, as a subsystem, is enabled, resulting in all its valence states being enabled by default.
* Chlorine is enabled, with Cl(+1) and Cl(-1) valence states explicitly enabled. Cl(+4) is not specified, so it defaults to enabled. Other valence states are explicitly disabled.
* Sodium is not included in the input, thus all its valence states are disabled by default.

It's important to note the default behaviors: missing known JSON objects are assumed to be disabled; hence Sodium is disabled by default. For the "redox" valence state, if an element like "Chlorine" is enabled, all its valence states are automatically enabled. Thus, if a valence state such as Cl(+4) is absent, it's automatically enabled. This approach mirrors OLI Studio's behavior.

To disable an individual valence state, `"enabled": false` must be explicitly set to override its default value.
{% endtab %}
{% endtabs %}


---

# 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/chemistry-model-files/chembuilder-api/supporting-information-for-chembuilder/enabled-keyword.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.
