Skip to content

physics-based-ml/LatticeGillespieCpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gillespie on a Lattice in the single occupancy limit

Features

Unimolecular and bimolecular reactions on 1D, 2D, 3D lattices.

example

Installation

Build

Use cmake

mkdir build
cd build
cmake ..
make
make install

The default location is /usr/local/lib and /usr/local/include.

Including

Use the convenient include <lattgillespie>.

Linking

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).

Usage

More documentation TBD!

Namespace

The namespace is lattg.

Setting up directory for output

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");

Packages

No packages published

Languages

  • Mathematica 93.1%
  • C++ 6.9%