physbox-mcp 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: physbox-mcp
3
+ Version: 2.0.0
4
+ Summary: PhysBox: MCP - Model Context Protocol server for local simulation apps
5
+ Author-email: Boab <boab@example.com>
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.12
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: fastmcp>=2.0.0
13
+ Requires-Dist: websockets>=12.0
14
+
15
+ # PhysBox: MCP
16
+
17
+ PhysBox: MCP is a Model Context Protocol (MCP) server that enables LLMs and MCP clients (such as Claude Code or Claude Desktop) to interact programmatically with the three simulation web applications in the browser:
18
+
19
+ | Application | Production URL | Description |
20
+ |---|---|---|
21
+ | **Flux** | [flux.physbox.io](https://flux.physbox.io) | Discrete-event / system-dynamics simulation (interactive React Flow graph) |
22
+ | **Volt** | [volt.physbox.io](https://volt.physbox.io) | SPICE circuit simulation (powered by NgSpice WASM in browser) |
23
+ | **Mesh** | [mesh.physbox.io](https://mesh.physbox.io) | Rigid-body physics simulation (powered by MuJoCo WASM in browser) |
24
+
25
+ All communication is handled via JSON over WebSockets directly to the web app in your browser—no browser automation or DOM scraping is needed.
26
+
27
+ ---
28
+
29
+ ## How It Works
30
+
31
+ PhysBox: MCP functions as a local companion server that establishes a WebSocket relay on port `3142`.
32
+
33
+ When you open any of the simulation web apps, they connect directly to this WebSocket relay. When an MCP client executes a tool call, the command flows from the client to the companion server, gets forwarded to the active browser tab, and the results flow back.
34
+
35
+ ```
36
+ MCP Client (e.g. Claude Desktop)
37
+ └── spawns → physbox-mcp (stdio)
38
+ └── WebSocket Server (ws://localhost:3142)
39
+ ├── Flux
40
+ ├── Volt
41
+ └── Mesh
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Installation
47
+
48
+ Install the companion server directly from PyPI:
49
+
50
+ ```bash
51
+ pip install physbox-mcp
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Usage & Setup
57
+
58
+ ### 1. Open the Web Applications
59
+ Launch or access the simulation web applications in your web browser:
60
+ * **Flux:** [flux.physbox.io](https://flux.physbox.io)
61
+ * **Volt:** [volt.physbox.io](https://volt.physbox.io)
62
+ * **Mesh:** [mesh.physbox.io](https://mesh.physbox.io)
63
+
64
+ As soon as a page finishes loading, it automatically registers with the companion WebSocket server.
65
+
66
+ ### 2. Configure Your MCP Client
67
+
68
+ #### For Claude Desktop
69
+ Add the following block to your Claude Desktop configuration file (typically located at `AppData/Roaming/Claude/claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "physbox-mcp": {
75
+ "command": "physbox-mcp",
76
+ "args": ["--stdio"]
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ #### For Claude Code
83
+ Add a `.mcp.json` file to your project root (or update your global configuration at `~/.claude/mcp.json`):
84
+
85
+ ```json
86
+ {
87
+ "mcpServers": {
88
+ "physbox-mcp": {
89
+ "type": "stdio",
90
+ "command": "physbox-mcp",
91
+ "args": ["--stdio"]
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ ### 3. Run the Companion Server Manually (Optional)
98
+ If you are running the server in HTTP mode rather than Stdio, you can run:
99
+
100
+ ```bash
101
+ # Starts HTTP server listening on port 3141 (default)
102
+ physbox-mcp
103
+ ```
104
+
105
+ Or configure custom port parameters:
106
+ ```bash
107
+ physbox-mcp --port=4000
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Development & Contribution
113
+ For instructions on local development, modifying schemas, extending tool definitions, and manual builds, please refer to [README_DEV.md](file:///wsl.localhost/Ubuntu-20.04/home/boab/expt_mcp/README_DEV.md).
@@ -0,0 +1,99 @@
1
+ # PhysBox: MCP
2
+
3
+ PhysBox: MCP is a Model Context Protocol (MCP) server that enables LLMs and MCP clients (such as Claude Code or Claude Desktop) to interact programmatically with the three simulation web applications in the browser:
4
+
5
+ | Application | Production URL | Description |
6
+ |---|---|---|
7
+ | **Flux** | [flux.physbox.io](https://flux.physbox.io) | Discrete-event / system-dynamics simulation (interactive React Flow graph) |
8
+ | **Volt** | [volt.physbox.io](https://volt.physbox.io) | SPICE circuit simulation (powered by NgSpice WASM in browser) |
9
+ | **Mesh** | [mesh.physbox.io](https://mesh.physbox.io) | Rigid-body physics simulation (powered by MuJoCo WASM in browser) |
10
+
11
+ All communication is handled via JSON over WebSockets directly to the web app in your browser—no browser automation or DOM scraping is needed.
12
+
13
+ ---
14
+
15
+ ## How It Works
16
+
17
+ PhysBox: MCP functions as a local companion server that establishes a WebSocket relay on port `3142`.
18
+
19
+ When you open any of the simulation web apps, they connect directly to this WebSocket relay. When an MCP client executes a tool call, the command flows from the client to the companion server, gets forwarded to the active browser tab, and the results flow back.
20
+
21
+ ```
22
+ MCP Client (e.g. Claude Desktop)
23
+ └── spawns → physbox-mcp (stdio)
24
+ └── WebSocket Server (ws://localhost:3142)
25
+ ├── Flux
26
+ ├── Volt
27
+ └── Mesh
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Installation
33
+
34
+ Install the companion server directly from PyPI:
35
+
36
+ ```bash
37
+ pip install physbox-mcp
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Usage & Setup
43
+
44
+ ### 1. Open the Web Applications
45
+ Launch or access the simulation web applications in your web browser:
46
+ * **Flux:** [flux.physbox.io](https://flux.physbox.io)
47
+ * **Volt:** [volt.physbox.io](https://volt.physbox.io)
48
+ * **Mesh:** [mesh.physbox.io](https://mesh.physbox.io)
49
+
50
+ As soon as a page finishes loading, it automatically registers with the companion WebSocket server.
51
+
52
+ ### 2. Configure Your MCP Client
53
+
54
+ #### For Claude Desktop
55
+ Add the following block to your Claude Desktop configuration file (typically located at `AppData/Roaming/Claude/claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "physbox-mcp": {
61
+ "command": "physbox-mcp",
62
+ "args": ["--stdio"]
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ #### For Claude Code
69
+ Add a `.mcp.json` file to your project root (or update your global configuration at `~/.claude/mcp.json`):
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "physbox-mcp": {
75
+ "type": "stdio",
76
+ "command": "physbox-mcp",
77
+ "args": ["--stdio"]
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ ### 3. Run the Companion Server Manually (Optional)
84
+ If you are running the server in HTTP mode rather than Stdio, you can run:
85
+
86
+ ```bash
87
+ # Starts HTTP server listening on port 3141 (default)
88
+ physbox-mcp
89
+ ```
90
+
91
+ Or configure custom port parameters:
92
+ ```bash
93
+ physbox-mcp --port=4000
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Development & Contribution
99
+ For instructions on local development, modifying schemas, extending tool definitions, and manual builds, please refer to [README_DEV.md](file:///wsl.localhost/Ubuntu-20.04/home/boab/expt_mcp/README_DEV.md).
@@ -0,0 +1 @@
1
+ __version__ = "2.0.0"
@@ -0,0 +1,271 @@
1
+ {
2
+ "overview": "Chemistry Sim is a browser-based interactive chemistry laboratory and reaction simulator. It uses a custom multi-iteration equilibrium solver (30 iterations per tick), kinetic tickers, and phase boundary models to simulate aqueous solutions, precipitates, indicators, liquid-liquid extraction, vacuum/distillation, electrolysis, and organic reactions. Canvas elements are built using React Flow, where apparatuses are nodes and tubing/pouring channels are edges.",
3
+ "workflow": [
4
+ "1. Use chemistry_get_schema to find the list of supported apparatuses, reagents, indicators, and solvents.",
5
+ "2. Use chemistry_get_state to check the current canvas: nodes (vessels/devices) and edges (pouring links or tubing).",
6
+ "3. Set up the lab apparatus on the canvas using chemistry_set_nodes and chemistry_set_edges.",
7
+ "4. Dispense starting chemicals/reagents into specific vessels using chemistry_dispense_reagent.",
8
+ "5. Set properties such as heating mantle temperature or vacuum pump status using chemistry_set_node_properties.",
9
+ "6. Pour between vessels by invoking chemistry_pour_vessel.",
10
+ "7. Simulate ticks headlessly using chemistry_run_headless to verify chemical changes, temperature spikes, pH indicator transitions, and distillates, then call chemistry_start to run in the live UI."
11
+ ],
12
+ "gotchas": [
13
+ "REACTION THERMODYNAMICS: Saponification (soap making) and Fischer esterification require a temperature above 60°C to run. Sulfuric acid catalyst is required for esterification, and strongly basic NaOH/KOH is required for saponification. Verify the heating mantle is connected via a 'heat' edge and set to a high temperature.",
14
+ "VACUUM BOILING: Engaging the vacuum line (connected via a 'vacuum' edge or checkbox) reduces pressure to 0.2 atm, dropping boiling points by ~120°C. For example, DMSO (bp 189°C) will boil and distill at 75°C.",
15
+ "OSCILLATORS: Briggs-Rauscher and Iodine Clock reactions require specific starting concentrations. The BR reaction will slowly damp out and eventually quench. If pH rises above 3.5, the BR reaction is instantly quenched.",
16
+ "PRECIPITATE CONSERVATION: When filtering using a Buchner Funnel, the liquid filtrate drains through the 'drain' edge into the receiver flask, leaving any solid precipitates (like soap cake or BaSO4) trapped inside the funnel as a cake.",
17
+ "HABER-BOSCH: Requires iron catalyst (fe_catalyst), temperature > 200°C (via heating mantle), N2 and H2 gases. Equilibrium position follows real thermodynamics — higher temperature favours reverse reaction (Le Chatelier). Optimal industrial temperature ~450°C balances rate vs yield.",
18
+ "ELECTROLYSIS: Connect an electrolysis node with current_A property. Cu anode is sacrificial (replenishes Cu2+). Inert Pt/C anode: Cl2 gas if [Cl-] > 0.5 M (chlor-alkali), else O2 from water oxidation. Cathode: Cu2+ > Ag+ deposited preferentially before H2 evolution.",
19
+ "AMPHOTERIC METALS: Zn, Al, Cr(OH)3 dissolve in excess NaOH to form zincate/aluminate/chromite. Zn(OH)2 and Ni(OH)2 also dissolve in excess NH3.",
20
+ "METAL REACTIVITY: Na/K react violently with water. Ca reacts steadily. Mg reacts in acid. Zn and Al are amphoteric. Cu dissolves only in oxidising acid (HNO3). Fe dissolves slowly in dilute acid.",
21
+ "DANGEROUS MIXTURES SIMULATED: Bleach + ammonia → chloramine gas. Bleach + acid → chlorine gas. Sulfide + acid → H2S gas. Sulfite + acid → SO2 gas. Cyanide + acid → HCN (do not acidify KCN)."
22
+ ],
23
+ "coordinateSystem": {
24
+ "canvasGrid": "React Flow canvas X increases to the right, Y increases downwards.",
25
+ "spacing": "Ensure vessels are spaced 150-300 units apart to leave room for visual connections without layout overlapping."
26
+ },
27
+ "reactionCapabilities": {
28
+ "acidBase": "Full strong/weak acid-base equilibria. Strong acids: HCl, H2SO4, HNO3, HF. Weak acids: CH3COOH (Ka=1.76e-5), H3PO4, H2C2O4 (Ka1=5.9e-2). Indicators: phenolphthalein (pKa 9.4), methyl orange (pKa 3.7), bromothymol blue (pKa 7.1). pH tracked to 0-14.",
29
+ "precipitation": "55+ ion pairs with real Ksp values. Includes silver salts (AgCl, AgBr, AgI, Ag2CO3, Ag2SO4, Ag3PO4, Ag2CrO4, Ag2S), barium salts (BaSO4, BaCO3, BaCrO4), calcium salts (CaCO3, CaSO4, CaF2, Ca3(PO4)2), lead salts (PbI2, PbSO4, PbCO3, PbS, PbCl2, PbCrO4), transition metal hydroxides and sulfides for Cu, Zn, Fe(II/III), Ni, Co, Mn, Cd, Mg, Al, Cr, Bi, Hg. Prussian Blue (Fe4[Fe(CN)6]3) from Fe3+/ferrocyanide.",
30
+ "complexation": "Cu2+ + 4NH3 → [Cu(NH3)4]2+ (deep blue, Kf~1e12). Fe3+ + SCN- → Fe(SCN)2+ (blood red, Kf=138). Fe2+/Fe3+ + 6CN- → ferrocyanide/ferricyanide. Ni2+ + dimethylglyoxime → scarlet NiDMG precipitate at pH 4-10. Cu2+ + 4I- → CuI + I2 (iodometric).",
31
+ "redox": "KMnO4 reduced to Mn2+ in acid or MnO2 in neutral/base. K2Cr2O7 reduced by Fe2+ in acid (Cr3+ product). H2O2 reduces MnO4- in acid. Oxalate reduces MnO4- (permanganometry standard).",
32
+ "chromateEquilibrium": "2CrO4(2-) + 2H+ ⇌ Cr2O7(2-) + H2O K=1e14. Automatically shifts with pH — acidic: orange Cr2O7, basic: yellow CrO4.",
33
+ "organic": "Fischer esterification (CH3COOH + EtOH ⇌ EtOAc, needs H+ catalyst and T>60C). Saponification (fat/EtOAc + OH-, T-dependent rate). Bromination of cyclohexene (Br2 decolorisation). Fermentation (glucose + yeast → EtOH + CO2). Benedict's test (Cu2O from reducing sugars at T>60C). Tollens' silver mirror (Ag+ + aldehyde + NH3). Iodine-starch complexation.",
34
+ "haberBosch": "N2 + 3H2 ⇌ 2NH3. Real thermodynamics: dG = -92400 + 198*T(K) J/mol. Kc computed from dG. Arrhenius kinetics. Requires iron catalyst and T>200C. Equilibrium shifts with temperature per Le Chatelier.",
35
+ "electrolysis": "Faraday's law (n_e = I*t/F). Cathode: Cu2+ > Ag+ deposited before H2 evolution. Inert anode: Cl2 (chlor-alkali, [Cl-]>0.5M) else O2 from water. Cu anode: sacrificial dissolution. Tracks deposited Cu(dep), Ag, H2(g), O2(g), Cl2(g).",
36
+ "distillation": "Boiling points adjusted for pressure via Clausius-Clapeyron. Volatile species (EtOH 78C, MeOH 65C, acetone 56C, DCM 40C, Et2O 35C, THF 66C, CHCl3 61C, EtOAc 77C, hexane 69C, toluene 111C, DMSO 189C). Fractional distillation of crude oil fractions (petrol/kerosene/diesel/bitumen).",
37
+ "liquidLiquidExtraction": "Partition by log Kd: hexane 3.9, toluene 2.73, CHCl3 1.97, EtOAc 0.73, Et2O 0.89, DCM 1.25. Hydrophilic species (Na+, Cl-, Cu2+, Fe(SCN)2+) stay aqueous. I2 prefers organic.",
38
+ "gasEvolution": "CO2 (carbonates + acid, fermentation), H2 (metals + acid, electrolysis), Cl2 (bleach + acid, electrolysis), ClNH2 (bleach + ammonia), SO2 (sulfite + acid), H2S (sulfide + acid), NO (nitrite + acid). Gas rate displayed visually as bubbles."
39
+ },
40
+ "tools": {
41
+ "chemistry_get_state": "Return current Chemistry simulator state: nodes, edges, isRunning, activePreset.",
42
+ "chemistry_start": "Start simulation ticks in the browser view.",
43
+ "chemistry_stop": "Stop/pause simulation ticks in the browser view.",
44
+ "chemistry_reset": "Reset simulator to initial preset flow state.",
45
+ "chemistry_clear": "Clear all nodes and edges from the canvas.",
46
+ "chemistry_list_presets": "List built-in chemistry lab presets, including instructions, recommended actions, node IDs, and edge IDs.",
47
+ "chemistry_load_preset": "Load a named lab preset.",
48
+ "chemistry_set_nodes": "Replace all nodes/apparatuses in the canvas.",
49
+ "chemistry_set_edges": "Replace all edges/wires in the canvas.",
50
+ "chemistry_dispense_reagent": "Dispense a specific reagent of given volume (mL) into a vessel node.",
51
+ "chemistry_pour_vessel": "Pour the entire contents (liquid and solid precipitates) of a source vessel into a target vessel.",
52
+ "chemistry_set_node_properties": "Update apparatus properties such as temperature, vacuumOn, stirring, or note card markdown content.",
53
+ "chemistry_run_headless": "Simulate the chemistry reaction ticks headlessly for N ticks. Returns the final nodes and full tick-by-tick trajectory. 10-20 ticks ≈ 1 second of real-world reaction time.",
54
+ "chemistry_run_headless_final": "Simulate the chemistry reaction ticks headlessly for N ticks. Returns ONLY the final node states (no trajectory), ensuring a very small response payload.",
55
+ "chemistry_get_schema": "Return the list of chemicals, indicator pKas, apparatus types, partition coefficients, and boiling points."
56
+ },
57
+ "schema": {
58
+ "nodeTypes": [
59
+ "beaker",
60
+ "flask_round",
61
+ "flask_erlenmeyer",
62
+ "sep_funnel",
63
+ "distillation_flask",
64
+ "condenser",
65
+ "rotovap",
66
+ "buchner_funnel",
67
+ "vacuum_line",
68
+ "addition_funnel",
69
+ "heating_mantle",
70
+ "drain",
71
+ "card"
72
+ ],
73
+ "nodeFields": {
74
+ "id": "string — unique node identifier",
75
+ "type": "string — always 'apparatus' or 'card'",
76
+ "data": {
77
+ "type": "string — apparatus type (e.g. 'beaker', 'flask_round', 'heating_mantle')",
78
+ "label": "string — display label",
79
+ "temperature": "number — local temperature in °C",
80
+ "vacuumOn": "boolean — true if vacuum pump connected and active",
81
+ "stirring": "boolean — true if magnetic stirrer active",
82
+ "refluxOn": "boolean — true if reflux condenser connected above vessel",
83
+ "markdown": "string — note card content (markdown)",
84
+ "state": {
85
+ "volume": "number — current volume in mL",
86
+ "species": "Record<string, number> — solute concentration in mol/L (M)",
87
+ "precipitates": "Record<string, number> — moles of solid precipitates inside vessel",
88
+ "pH": "number — solution pH (0-14)",
89
+ "temperature": "number — solution temperature in °C",
90
+ "pressure": "number — internal pressure in atm",
91
+ "oscillatorActive": "boolean — true if oscillating clock reaction is active",
92
+ "oscillatorPhase": "number — internal oscillation counter"
93
+ }
94
+ }
95
+ },
96
+ "reagents": [
97
+ { "id": "hcl", "name": "Hydrochloric Acid", "formula": "HCl (aq) 1 M", "category": "acid" },
98
+ { "id": "h2so4", "name": "Sulfuric Acid (conc.)", "formula": "H2SO4 18 M", "category": "acid", "warning": "violent heat on dilution" },
99
+ { "id": "hno3", "name": "Nitric Acid (conc.)", "formula": "HNO3 16 M", "category": "acid", "warning": "oxidising acid" },
100
+ { "id": "h2o2", "name": "Hydrogen Peroxide (30%)", "formula": "H2O2 9.8 M", "category": "oxidiser" },
101
+ { "id": "h3po4", "name": "Phosphoric Acid", "formula": "H3PO4 85%", "category": "acid" },
102
+ { "id": "acetic", "name": "Acetic Acid (glacial)", "formula": "CH3COOH 17 M", "category": "acid", "boilingPoint": 118 },
103
+ { "id": "hf", "name": "Hydrofluoric Acid", "formula": "HF (aq)", "category": "acid", "warning": "severe tissue hazard" },
104
+ { "id": "naoh", "name": "Sodium Hydroxide", "formula": "NaOH (aq) 1 M", "category": "base" },
105
+ { "id": "koh", "name": "Potassium Hydroxide", "formula": "KOH (aq) 1 M", "category": "base" },
106
+ { "id": "nh3", "name": "Ammonia (conc.)", "formula": "NH3 (aq) 14 M", "category": "base", "warning": "pungent vapour" },
107
+ { "id": "conc_nh3", "name": "Ammonia (saturated 28%)", "formula": "NH3 (aq) 14 M", "category": "base" },
108
+ { "id": "ca_oh2", "name": "Calcium Hydroxide (slaked lime)", "formula": "Ca(OH)2 sat. 22 mM", "category": "base" },
109
+ { "id": "na2co3", "name": "Sodium Carbonate", "formula": "Na2CO3 0.1 M", "category": "base" },
110
+ { "id": "nahco3", "name": "Sodium Bicarbonate", "formula": "NaHCO3 1 M", "category": "base" },
111
+ { "id": "nacl", "name": "Sodium Chloride (brine)", "formula": "NaCl 1 M", "category": "salt" },
112
+ { "id": "agno3", "name": "Silver Nitrate", "formula": "AgNO3 0.1 M", "category": "salt", "warning": "stains skin black" },
113
+ { "id": "ki", "name": "Potassium Iodide", "formula": "KI 0.1 M", "category": "salt" },
114
+ { "id": "pb_no3", "name": "Lead Nitrate", "formula": "Pb(NO3)2 0.025 M", "category": "salt", "warning": "toxic — lead compound" },
115
+ { "id": "lead_nitrate", "name": "Lead Nitrate (0.5 M)", "formula": "Pb(NO3)2 0.5 M", "category": "salt", "warning": "toxic — lead compound" },
116
+ { "id": "bacl2", "name": "Barium Chloride", "formula": "BaCl2 0.1 M", "category": "salt", "warning": "toxic — soluble barium" },
117
+ { "id": "na2so4", "name": "Sodium Sulfate", "formula": "Na2SO4 0.1 M", "category": "salt" },
118
+ { "id": "fecl3", "name": "Iron(III) Chloride (5 mM)", "formula": "FeCl3 5 mM", "category": "salt" },
119
+ { "id": "iron3_chloride", "name": "Iron(III) Chloride (0.5 M)", "formula": "FeCl3 0.5 M", "category": "salt" },
120
+ { "id": "iron3_nitrate", "name": "Iron(III) Nitrate", "formula": "Fe(NO3)3 0.5 M", "category": "salt" },
121
+ { "id": "iron2_sulfate", "name": "Iron(II) Sulfate", "formula": "FeSO4 0.5 M", "category": "salt", "warning": "oxidises to Fe3+ in air" },
122
+ { "id": "cuso4", "name": "Copper(II) Sulfate", "formula": "CuSO4 0.1 M", "category": "salt" },
123
+ { "id": "copper_nitrate", "name": "Copper(II) Nitrate", "formula": "Cu(NO3)2 0.5 M", "category": "salt" },
124
+ { "id": "copper_sulfate_50", "name": "CuSO4 Electroplating Bath", "formula": "CuSO4 50 mM", "category": "electrolyte" },
125
+ { "id": "nh4scn", "name": "Ammonium Thiocyanate", "formula": "NH4SCN 25 mM", "category": "salt" },
126
+ { "id": "kmno4", "name": "Potassium Permanganate", "formula": "KMnO4 20 mM", "category": "oxidiser", "warning": "strong oxidiser" },
127
+ { "id": "k2cr2o7", "name": "Potassium Dichromate", "formula": "K2Cr2O7", "category": "oxidiser", "warning": "Cr(VI) carcinogen" },
128
+ { "id": "k2cro4", "name": "Potassium Chromate", "formula": "K2CrO4 0.02 M", "category": "salt", "warning": "Cr(VI) carcinogen" },
129
+ { "id": "potassium_chromate", "name": "Potassium Chromate (0.5 M)", "formula": "K2CrO4 0.5 M", "category": "salt" },
130
+ { "id": "na2s2o3", "name": "Sodium Thiosulfate", "formula": "Na2S2O3 0.1 M", "category": "reducing agent" },
131
+ { "id": "i2", "name": "Iodine Solution", "formula": "I2/KI (aq) 10 mM", "category": "reagent" },
132
+ { "id": "caso4", "name": "Calcium Sulfate (Drierite)", "formula": "CaSO4 anhydrous", "category": "drying agent" },
133
+ { "id": "mgso4", "name": "Magnesium Sulfate (anhydrous)", "formula": "MgSO4 anhydrous", "category": "drying agent" },
134
+ { "id": "phenol", "name": "Phenolphthalein", "formula": "C20H14O4 indicator", "category": "indicator", "pKa": 9.4, "colourChange": "colourless → pink at pH 8.2-10" },
135
+ { "id": "methyl_o", "name": "Methyl Orange", "formula": "indicator", "category": "indicator", "pKa": 3.7, "colourChange": "red → yellow at pH 3.1-4.4" },
136
+ { "id": "btb", "name": "Bromothymol Blue", "formula": "indicator", "category": "indicator", "pKa": 7.1, "colourChange": "yellow → blue at pH 6-7.6" },
137
+ { "id": "starch_solution", "name": "Starch Solution", "formula": "starch 0.5%", "category": "indicator", "note": "turns deep blue-black with I3-" },
138
+ { "id": "ethanol", "name": "Ethanol (95%)", "formula": "EtOH 16 M", "category": "solvent", "boilingPoint": 78.4, "density": 0.789, "flammable": true },
139
+ { "id": "methanol", "name": "Methanol", "formula": "MeOH 24.7 M", "category": "solvent", "boilingPoint": 64.7, "density": 0.791, "warning": "toxic — blindness/death" },
140
+ { "id": "acetone", "name": "Acetone", "formula": "(CH3)2CO 13.5 M", "category": "solvent", "boilingPoint": 56.1, "density": 0.791, "flammable": true },
141
+ { "id": "dcm", "name": "Dichloromethane (DCM)", "formula": "CH2Cl2 13.1 M", "category": "solvent", "boilingPoint": 40, "density": 1.325 },
142
+ { "id": "ethyl_acetate", "name": "Ethyl Acetate", "formula": "EtOAc 11.4 M", "category": "solvent", "boilingPoint": 77.1, "density": 0.902, "flammable": true },
143
+ { "id": "hexane", "name": "Hexane", "formula": "n-C6H14 7.7 M", "category": "solvent", "boilingPoint": 69, "density": 0.659, "flammable": true },
144
+ { "id": "toluene", "name": "Toluene", "formula": "PhCH3 9.4 M", "category": "solvent", "boilingPoint": 111, "density": 0.867, "flammable": true },
145
+ { "id": "diethyl_ether", "name": "Diethyl Ether", "formula": "Et2O 6.9 M", "category": "solvent", "boilingPoint": 34.6, "density": 0.713, "warning": "extreme fire hazard — forms peroxides" },
146
+ { "id": "chloroform", "name": "Chloroform", "formula": "CHCl3 12.5 M", "category": "solvent", "boilingPoint": 61.2, "density": 1.483 },
147
+ { "id": "dmso", "name": "DMSO", "formula": "(CH3)2SO 14.1 M", "category": "solvent", "boilingPoint": 189, "warning": "skin penetration enhancer" },
148
+ { "id": "thf", "name": "THF", "formula": "C4H8O 12.3 M", "category": "solvent", "boilingPoint": 66, "flammable": true, "warning": "forms explosive peroxides" },
149
+ { "id": "water", "name": "Distilled Water", "formula": "H2O", "category": "solvent", "boilingPoint": 100, "density": 1.0 },
150
+ { "id": "na_metal", "name": "Sodium Metal", "formula": "Na (s)", "category": "reactive metal", "warning": "violent reaction with water" },
151
+ { "id": "k_metal", "name": "Potassium Metal", "formula": "K (s)", "category": "reactive metal", "warning": "extremely violent reaction with water, may self-ignite" },
152
+ { "id": "mg_metal", "name": "Magnesium Ribbon", "formula": "Mg (s)", "category": "reactive metal", "warning": "burns with blinding white light" },
153
+ { "id": "zn_metal", "name": "Zinc (granulated)", "formula": "Zn (s)", "category": "reactive metal" },
154
+ { "id": "al_metal", "name": "Aluminium (foil/powder)", "formula": "Al (s)", "category": "reactive metal", "note": "amphoteric — dissolves in acid AND strong base" },
155
+ { "id": "ca_metal", "name": "Calcium Metal", "formula": "Ca (s)", "category": "reactive metal" },
156
+ { "id": "cu_metal", "name": "Copper (turnings)", "formula": "Cu (s)", "category": "reactive metal", "note": "unreactive in dilute acid; dissolves in HNO3" },
157
+ { "id": "fe_metal", "name": "Iron Wool / Filings", "formula": "Fe (s)", "category": "reactive metal" },
158
+ { "id": "vegetable_oil", "name": "Vegetable Oil", "formula": "tristearin", "category": "organic", "note": "saponifies with NaOH at T>60C" },
159
+ { "id": "crude_oil", "name": "Crude Oil", "formula": "hydrocarbon mixture", "category": "organic", "note": "fractionally distilled into petrol/kerosene/diesel/bitumen" },
160
+ { "id": "nicl2", "name": "Nickel(II) Chloride", "formula": "NiCl2 0.1 M", "category": "salt" },
161
+ { "id": "nickel_sulfate", "name": "Nickel Sulfate", "formula": "NiSO4 1 M", "category": "salt" },
162
+ { "id": "dmg", "name": "Dimethylglyoxime (DMG)", "formula": "C4H8N2O2 50 mM", "category": "chelating agent", "note": "scarlet NiDMG2 precipitate at pH 4-10" },
163
+ { "id": "na2s", "name": "Sodium Sulfide", "formula": "Na2S 0.1 M", "category": "salt", "warning": "releases toxic H2S in acid" },
164
+ { "id": "sodium_sulfide", "name": "Sodium Sulfide (0.5 M)", "formula": "Na2S 0.5 M", "category": "salt", "warning": "releases toxic H2S in acid" },
165
+ { "id": "znso4", "name": "Zinc Sulfate", "formula": "ZnSO4 0.1 M", "category": "salt" },
166
+ { "id": "zinc_sulfate", "name": "Zinc Sulfate (1 M)", "formula": "ZnSO4 1 M", "category": "salt" },
167
+ { "id": "zinc_chloride", "name": "Zinc Chloride", "formula": "ZnCl2 1 M", "category": "salt" },
168
+ { "id": "cobalt_chloride", "name": "Cobalt Chloride", "formula": "CoCl2 1 M", "category": "salt" },
169
+ { "id": "manganese_sulfate", "name": "Manganese Sulfate", "formula": "MnSO4 1 M", "category": "salt" },
170
+ { "id": "aluminium_sulfate", "name": "Aluminium Sulfate (Alum)", "formula": "Al2(SO4)3 0.5 M", "category": "salt" },
171
+ { "id": "magnesium_sulfate", "name": "Magnesium Sulfate (Epsom Salt)", "formula": "MgSO4 1 M", "category": "salt" },
172
+ { "id": "cadmium_nitrate", "name": "Cadmium Nitrate", "formula": "Cd(NO3)2 0.5 M", "category": "salt", "warning": "highly toxic — carcinogen" },
173
+ { "id": "bismuth_nitrate", "name": "Bismuth Nitrate", "formula": "Bi(NO3)3 0.1 M", "category": "salt" },
174
+ { "id": "mercury_nitrate", "name": "Mercury(II) Nitrate", "formula": "Hg(NO3)2 0.1 M", "category": "salt", "warning": "highly toxic neurotoxin" },
175
+ { "id": "sodium_bromide", "name": "Sodium Bromide", "formula": "NaBr 1 M", "category": "salt" },
176
+ { "id": "sodium_iodide", "name": "Sodium Iodide", "formula": "NaI 1 M", "category": "salt" },
177
+ { "id": "potassium_chromate", "name": "Potassium Chromate (0.5 M)", "formula": "K2CrO4 0.5 M", "category": "salt" },
178
+ { "id": "sodium_phosphate", "name": "Sodium Phosphate", "formula": "Na3PO4 0.3 M", "category": "salt" },
179
+ { "id": "sodium_fluoride", "name": "Sodium Fluoride", "formula": "NaF 1 M", "category": "salt" },
180
+ { "id": "k4fe_cn6", "name": "Potassium Ferrocyanide", "formula": "K4[Fe(CN)6] 0.1 M", "category": "salt", "note": "forms Prussian Blue with Fe3+" },
181
+ { "id": "k3fe_cn6", "name": "Potassium Ferricyanide", "formula": "K3[Fe(CN)6] 0.1 M", "category": "salt", "note": "Turnbull's Blue test for Fe2+" },
182
+ { "id": "na2so3", "name": "Sodium Sulfite", "formula": "Na2SO3 0.5 M", "category": "salt", "note": "SO2 gas released in acid" },
183
+ { "id": "nano2", "name": "Sodium Nitrite", "formula": "NaNO2 0.5 M", "category": "salt", "note": "NO gas released in acid" },
184
+ { "id": "kcn", "name": "Potassium Cyanide", "formula": "KCN 0.1 M", "category": "salt", "warning": "EXTREMELY TOXIC. Never acidify — releases HCN gas." },
185
+ { "id": "n2_gas", "name": "Nitrogen Gas", "formula": "N2 (g)", "category": "gas", "note": "Haber-Bosch feedstock" },
186
+ { "id": "h2_gas", "name": "Hydrogen Gas", "formula": "H2 (g)", "category": "gas", "warning": "highly flammable", "note": "Haber-Bosch feedstock" },
187
+ { "id": "fe_catalyst", "name": "Iron Catalyst", "formula": "Fe (s)", "category": "catalyst", "note": "required for Haber-Bosch at T>200C" },
188
+ { "id": "bleach", "name": "Bleach (NaOCl)", "formula": "NaOCl (aq) 1 M", "category": "oxidiser", "warning": "NEVER mix with ammonia or acids" },
189
+ { "id": "pool_shock", "name": "Pool Shock Ca(OCl)2", "formula": "Ca(OCl)2", "category": "oxidiser", "warning": "strong oxidiser — releases Cl2 with acid" },
190
+ { "id": "muriatic_acid", "name": "Muriatic Acid (HCl 30%)", "formula": "HCl 9.5 M", "category": "acid" },
191
+ { "id": "vinegar", "name": "White Vinegar (5% AcOH)", "formula": "CH3COOH 0.83 M", "category": "acid" },
192
+ { "id": "baking_soda", "name": "Baking Soda (NaHCO3)", "formula": "NaHCO3 1 M", "category": "base" },
193
+ { "id": "washing_soda", "name": "Washing Soda (Na2CO3)", "formula": "Na2CO3 0.1 M", "category": "base" },
194
+ { "id": "rust", "name": "Rust (Fe2O3)", "formula": "Fe2O3 (s)", "category": "solid", "note": "dissolves in acid or acetic acid to give Fe3+" },
195
+ { "id": "hard_water", "name": "Hard Water (Ca/Mg salts)", "formula": "CaCO3/MgCO3 dissolved", "category": "aqueous", "note": "softened by Na2CO3 (CaCO3 precipitate)" },
196
+ { "id": "pool_algicide", "name": "Copper Sulfate (Algicide)", "formula": "CuSO4 10 mM", "category": "salt" },
197
+ { "id": "glucose", "name": "Glucose Solution", "formula": "C6H12O6 0.5 M", "category": "organic", "note": "reducing sugar — Benedict's/Tollens' positive" },
198
+ { "id": "fructose", "name": "Fructose Solution", "formula": "C6H12O6 0.5 M", "category": "organic", "note": "reducing sugar — Benedict's positive" },
199
+ { "id": "formaldehyde", "name": "Formaldehyde (Formalin 10%)", "formula": "HCHO 3.3 M", "category": "organic", "warning": "IARC Group 1 carcinogen" },
200
+ { "id": "acetaldehyde", "name": "Acetaldehyde", "formula": "CH3CHO 12 M", "category": "organic", "boilingPoint": 20.2 },
201
+ { "id": "benedicts", "name": "Benedict's Reagent", "formula": "Cu2+/Na2CO3/citrate", "category": "analytical", "note": "brick-red Cu2O from reducing sugars at T>60C" },
202
+ { "id": "tollens", "name": "Tollens' Reagent (freshly prepared)", "formula": "[Ag(NH3)2]+ aq.", "category": "analytical", "warning": "PREPARE FRESH ONLY — aged forms explosive AgN3" },
203
+ { "id": "sodium_oxalate", "name": "Sodium Oxalate", "formula": "Na2C2O4 0.5 M", "category": "analytical", "note": "decolorises KMnO4 — primary standard" },
204
+ { "id": "oxalic_acid", "name": "Oxalic Acid", "formula": "H2C2O4 0.5 M", "category": "acid", "note": "diprotic, Ka1=5.9e-2. Primary standard for KMnO4" },
205
+ { "id": "nh4cl", "name": "Ammonium Chloride", "formula": "NH4Cl 1 M", "category": "salt", "note": "mildly acidic pH~5; NH4+/NH3 buffer with ammonia" },
206
+ { "id": "sodium_acetate", "name": "Sodium Acetate", "formula": "CH3COONa 1 M", "category": "salt", "note": "mildly basic pH~8.9; acetate buffer with acetic acid" },
207
+ { "id": "edta_solution", "name": "EDTA (0.1 M)", "formula": "Na2EDTA 0.1 M", "category": "chelating agent", "note": "titrates most metal ions; water hardness determination" },
208
+ { "id": "potassium_nitrate", "name": "Potassium Nitrate (saltpetre)", "formula": "KNO3 1 M", "category": "salt" },
209
+ { "id": "h2o2_3pct", "name": "Hydrogen Peroxide (3%)", "formula": "H2O2 0.9 M", "category": "oxidiser" },
210
+ { "id": "dilute_h2so4", "name": "Dilute Sulfuric Acid", "formula": "H2SO4 0.5 M", "category": "acid" },
211
+ { "id": "dilute_hno3", "name": "Dilute Nitric Acid", "formula": "HNO3 0.5 M", "category": "acid" },
212
+ { "id": "ammonium_sulfate", "name": "Ammonium Sulfate", "formula": "(NH4)2SO4 1 M", "category": "salt" },
213
+ { "id": "potassium_carbonate", "name": "Potassium Carbonate", "formula": "K2CO3 0.5 M", "category": "base" },
214
+ { "id": "strontium_chloride", "name": "Strontium Chloride", "formula": "SrCl2 0.5 M", "category": "salt" },
215
+ { "id": "bromine_water", "name": "Bromine Water", "formula": "Br2 (aq) 0.1 M", "category": "oxidiser", "warning": "toxic vapour — use in fume hood" },
216
+ { "id": "cyclohexene_l", "name": "Cyclohexene", "formula": "C6H10 neat", "category": "organic", "boilingPoint": 83, "note": "instantly decolorises Br2 — alkene test" },
217
+ { "id": "glucose_yeast", "name": "Glucose + Yeast (Fermentation)", "formula": "C6H12O6 + Saccharomyces", "category": "organic", "note": "ferments to EtOH + CO2" },
218
+ { "id": "brine_electrolysis", "name": "Saturated NaCl Brine", "formula": "NaCl 6 M", "category": "electrolyte", "note": "chlor-alkali: Cl2 at anode, H2 + NaOH at cathode" },
219
+ { "id": "dilute_h2so4_electrolysis", "name": "Dilute H2SO4 (Hofmann)", "formula": "H2SO4 0.5 M", "category": "electrolyte", "note": "water electrolysis: H2:O2 = 2:1 by volume" }
220
+ ],
221
+ "partitionCoefficients": {
222
+ "description": "log Kd values (positive = prefers organic layer, negative = prefers aqueous layer). Used in sep funnel liquid-liquid extraction.",
223
+ "hexane": 3.9,
224
+ "toluene": 2.73,
225
+ "CHCl3": 1.97,
226
+ "DCM": 1.25,
227
+ "Et2O": 0.89,
228
+ "EtOAc": 0.73,
229
+ "THF": 0.46,
230
+ "acetone": -0.24,
231
+ "EtOH": 0.1,
232
+ "DMSO": -1.35,
233
+ "MeOH": -0.77,
234
+ "I2(aq)": 2.5,
235
+ "I3-": -0.3,
236
+ "Fe(SCN)2+": -1.0,
237
+ "Cu2+": -3.0,
238
+ "Na+": -5,
239
+ "Cl-": -5
240
+ },
241
+ "boilingPoints": {
242
+ "description": "Normal boiling points at 1 atm (°C). Adjusted for pressure via Clausius-Clapeyron. Vacuum line reduces pressure to ~0.2 atm, lowering BP by ~120°C.",
243
+ "Et2O": 34.6,
244
+ "DCM": 40.0,
245
+ "acetone": 56.1,
246
+ "THF": 66.0,
247
+ "hexane": 69.0,
248
+ "EtOH": 78.4,
249
+ "cyclohexene": 83.0,
250
+ "acetic": 118.0,
251
+ "EtOAc": 77.1,
252
+ "MeOH": 64.7,
253
+ "CHCl3": 61.2,
254
+ "toluene": 111.0,
255
+ "water": 100.0,
256
+ "DMSO": 189.0,
257
+ "glycerol": 290.0,
258
+ "CH3CHO": 20.2
259
+ },
260
+ "precipitates": {
261
+ "description": "Solid precipitates tracked in mol. Form when ion product exceeds Ksp. 55+ ion pairs supported.",
262
+ "silverSalts": ["AgCl (white)", "AgBr (pale yellow)", "AgI (yellow)", "Ag2CO3 (pale yellow)", "Ag2SO4 (white)", "Ag3PO4 (yellow)", "Ag2CrO4 (brick red)", "Ag2S (black)", "AgOH (brownish)", "Ag (silver mirror — Tollens)"],
263
+ "bariumSalts": ["BaSO4 (white)", "BaCO3 (white)", "BaCrO4 (yellow)", "BaF2 (white)"],
264
+ "calciumSalts": ["CaCO3 (white)", "CaSO4 (white)", "CaF2 (white)", "Ca3(PO4)2 (white)"],
265
+ "leadSalts": ["PbI2 (golden — golden rain)", "PbSO4 (white)", "PbCO3 (white)", "PbS (black)", "PbCl2 (white)", "PbCrO4 (yellow)", "Pb(OH)2 (white)"],
266
+ "transitionMetalHydroxides": ["Cu(OH)2 (pale blue)", "Fe(OH)2 (pale green)", "Fe(OH)3 (rust)", "Ni(OH)2 (green)", "Co(OH)2 (pink)", "Mn(OH)2 (pale pink)", "Zn(OH)2 (white)", "Cd(OH)2 (white)", "Al(OH)3 (white gelatinous)", "Cr(OH)3 (grey-green)", "Mg(OH)2 (white)", "Bi(OH)3 (white)"],
267
+ "metalSulfides": ["CuS (black)", "ZnS (pale yellow)", "FeS (black)", "NiS (black)", "CoS (black)", "MnS (salmon)", "CdS (yellow)", "HgS (red/black)", "PbS (black)", "Ag2S (black)"],
268
+ "special": ["NiDMG (scarlet — dimethylglyoximate)", "Fe4[Fe(CN)6]3 (Prussian Blue)", "Cu2O (brick red — Benedict's positive)", "MnO2 (dark brown)", "Cu(dep) (orange — electrodeposited)", "CuI (white — iodometric)"]
269
+ }
270
+ }
271
+ }