#simulation #reaction #networking #chemistry #input-file

bin+lib tausplit

A chemical reaction network simulator

1 unstable release

0.1.0 Sep 25, 2025

#142 in Science

Download history 105/week @ 2025-09-22 23/week @ 2025-09-29 5/week @ 2025-10-06

133 downloads per month

MIT license

205KB
4K SLoC

The Tau-Splitting algorithm

The Tau-Splitting algorithm is an algorithm for the simulation of chemical reaction networks.

The code can be installed with cargo install tausplit. Afterwards, it can be used with

tausplit {time} {input_file}

to simulate the chemical reaction network specified in the input file, and output a TSV containing the initial and final states of the system.

Options

-s {count}, --samples {count}

Samples the state of the system count evenly spaced times. If time is 40 and count is 4, the algorithm will sample the system at 10, 20, 30, and 40.

--algorithm {algorithm}

Uses the given algorithm to simulate the system. The currently supported algorithms are tau-split and gillespie.

--seed

Uses the given seed for random number generation during the algorithm's run.

--count-reactions

Adds the total number of reactions to the TSV produced.

--cpu-time

Adds the total runtime of the algorithm to the TSV produced.

--no-print-state

Makes the program not include the state of the system in the TSV produced.

Input format

The chemical reaction networks are specified by files in the following format:

A = 5
B = 3
C = 0
D = 0

A + B -> C + 3D, 3.5

Rows of the format A = 5 define that a chemical species A exists, and that its amount at the beginning of the simulation is 5. Rows of the format A + B -> C + 3D, 3.5 define the chemical reaction in which A and B react to form one C and three Ds, with a rate constant of 3.5. The reaction network can be split across any number of files, allowing using the same chemical reaction network with different initial states.

Lines starting with # are treated as comments, and are not parsed.

Dependencies

~6–19MB
~248K SLoC