You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70Lines changed: 70 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,76 @@ Copyright (C) 2020 National Science Foundation - National Center for Atmospheric
16
16
# Installation
17
17
```
18
18
pip install acom-music-box
19
+
```
20
+
# Using the MusicBox API
21
+
22
+
MusicBox makes its chemical mechanism analysis and visualization available through a Python API. The following example works through solving a simple chemistry system. Please refer to the [official documentation](https://ncar.github.io/music-box/branch/main/index.html) for further tutorials and examples.
23
+
```
24
+
# Import MusicBox, MusicBox conditions, and Musica mechanisms:
25
+
26
+
from acom_music_box import MusicBox, Conditions
27
+
import musica.mechanism_configuration as mc
28
+
29
+
30
+
# Define the chemical system of interest
31
+
32
+
# MusicBox uses Musica (https://ncar.github.io/musica/index.html) to create specific chemical species and phases of interest for chemical mechanisms.
33
+
34
+
A = mc.Species(name="A")
35
+
B = mc.Species(name="B")
36
+
C = mc.Species(name="C")
37
+
38
+
species = {"A":A, "B":B, "C":C}
39
+
40
+
gas = mc.Phase(name="gas", species=list(species.values()))
41
+
42
+
# Define a mechanism of interest
43
+
44
+
# Through Musica, several different mechanisms can be explored to define reaction rates. Here, we use the Arrhenius equation as a simple example.
This documentation describes the Python API for MusicBox.
6
+
For detailed information on the chemistry-related objects and reaction definitions used in MusicBox via MUSICA, see the :mod:`musica.mechanism_configuration`
0 commit comments