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
@@ -159,7 +159,7 @@ Macro that creates several compound species, which each is composed of smaller c
159
159
Example:
160
160
```julia
161
161
t = default_t()
162
-
@species C(t) H(t) O(t)
162
+
@species C(t) H(t) O(t)
163
163
@compounds
164
164
CH4(t) = C + 4H
165
165
O2(t) = 2O
@@ -168,11 +168,11 @@ t = default_t()
168
168
end
169
169
```
170
170
171
-
Notes:
171
+
Notes:
172
172
- The component species must be defined before using the `@compound` macro.
173
173
"""
174
174
macrocompounds(expr)
175
-
make_compounds(MacroTools.striplines(expr))
175
+
make_compounds(striplines(expr))
176
176
end
177
177
178
178
# Function managing the @compound macro.
@@ -183,7 +183,7 @@ function make_compounds(expr)
183
183
# For each compound in `expr`, creates the set of 7 compound creation lines (using `make_compound`).
184
184
# Next, loops through all 7*[Number of compounds] lines and add them to compound_declarations.
185
185
compound_calls = [Catalyst.make_compound(line) for line in expr.args]
186
-
for compound_call in compound_calls, line inMacroTools.striplines(compound_call).args
186
+
for compound_call in compound_calls, line instriplines(compound_call).args
187
187
push!(compound_declarations.args, line)
188
188
end
189
189
@@ -249,7 +249,7 @@ brxs = balance_reaction(rx) # No solution.
249
249
250
250
Notes:
251
251
- Balancing reactions that contain compounds of compounds is currently not supported.
252
-
- A reaction may not always yield a single solution; it could have an infinite number of solutions or none at all. When there are multiple solutions, a vector of all possible `Reaction` objects is returned. However, substrates and products may be interchanged as we currently do not solve for a linear combination that maintains the set of substrates and products.
252
+
- A reaction may not always yield a single solution; it could have an infinite number of solutions or none at all. When there are multiple solutions, a vector of all possible `Reaction` objects is returned. However, substrates and products may be interchanged as we currently do not solve for a linear combination that maintains the set of substrates and products.
253
253
- If the reaction cannot be balanced, an empty `Reaction` vector is returned.
254
254
"""
255
255
functionbalance_reaction(reaction::Reaction)
@@ -369,16 +369,16 @@ From a system, creates a new system where each reaction is a balanced version of
369
369
reaction of the original system. For more information, consider the `balance_reaction` function
370
370
(which is internally applied to each system reaction).
371
371
372
-
Arguments
372
+
Arguments
373
373
- `rs`: The reaction system that should be balanced.
374
374
375
375
Notes:
376
376
- If any reaction in the system cannot be balanced, throws an error.
377
-
- If any reaction in the system have an infinite number of potential reactions, throws an error.
377
+
- If any reaction in the system have an infinite number of potential reactions, throws an error.
378
378
Here, it would be possible to generate a valid reaction, however, no such routine is currently
379
379
implemented in `balance_system`.
380
380
- `balance_system` will not modify reactions of subsystems to the input system. It is recommended
381
-
not to apply `balance_system` to non-flattened systems.
381
+
not to apply `balance_system` to non-flattened systems.
382
382
"""
383
383
functionbalance_system(rs::ReactionSystem)
384
384
@set! rs.eqs = CatalystEqType[get_balanced_reaction(eq) for eq inget_eqs(rs)]
@@ -391,7 +391,7 @@ end
391
391
functionget_balanced_reaction(rx::Reaction)
392
392
brxs =balance_reaction(rx)
393
393
394
-
# In case there are no, or multiple, solutions to the balancing problem.
394
+
# In case there are no, or multiple, solutions to the balancing problem.
395
395
ifisempty(brxs)
396
396
error("Could not balance reaction `$rx`, unable to create a balanced `ReactionSystem`.")
0 commit comments