Unimolecular and bimolecular reactions on 1D, 2D, 3D lattices.
Use cmake
mkdir build
cd build
cmake ..
make
make install
The default location is /usr/local/lib
and /usr/local/include
.
Use the convenient include <lattgillespie>
.
Example:
g++ -std=c++14 -O3 -llattgillespie -o main.o main.cpp
Be sure to put it into your DYLD_LIBRARY_PATH
:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/absolute/path/to/lib/folder
else use the -L
flag when linking. (-L
needed at link time; DYLD_LIBRARY_PATH
needed at runtime).
More documentation TBD!
The namespace is lattg
.
A directory structure must be created for the output.
Use the included Python script create_data_dirs.py
.
For example:
mkdir data
cd data
cp /path/to/create_data_dirs.py ./
python create_data_dirs.py
Before running, adjust the range for the number of directories to output.
Then, when running the main script, in the run
command, specify the data
directory in the final argument dir
, e.g.
sim.run(n_steps,verbose,write_counts,write_nns,write_latt,write_step,write_version_no,"/path/to/data");