Add reaction and Reaction.

This commit is contained in:
Sergiu Ivanov 2023-08-08 17:40:44 +02:00
parent 3821a11d38
commit 6cf1505a61
2 changed files with 22 additions and 1 deletions

8
rs.rkt
View File

@ -4,12 +4,18 @@
(require typed/graph "utils.rkt" "dynamics.rkt")
(provide
Species)
Species (struct-out reaction) Reaction)
(module+ test
(require typed/rackunit))
(define-type Species Symbol)
(struct reaction ([reactants : (Setof Species)]
[inhibitors : (Setof Species)]
[products : (Setof Species)])
#:transparent
#:type-name Reaction)
)
(require graph "utils.rkt" "generic.rkt")

View File

@ -32,6 +32,21 @@ A synonym of @racket[Symbol].
}
@defstruct*[reaction ([reactants (Setof Species)]
[inhibitors (Setof Species)]
[products (Setof Species)])]{
A reaction is a triple of sets, giving the reactants, the inhibitors,
and the products, respectively.
}
@deftype[Reaction]{
The type of the instances of @racket[reaction].
}
@section{Org-mode interaction}
This section contains some useful primitives for