Skip to content

C++ back end application that interfaces with biological simulation engines and serves simulation data to the front end website

License

Notifications You must be signed in to change notification settings

simularium/simularium-engine

Simularium repositories

This repository is part of the Simularium project (simularium.allencell.org), which includes repositories:

  • simulariumIO - Python package that converts simulation outputs to the format consumed by the Simularium viewer website
  • simularium-engine - C++ backend application that interfaces with biological simulation engines and serves simulation data to the front end website
  • simularium-viewer - NPM package to view Simularium trajectories in 3D
  • simularium-website - Front end website for the Simularium project, includes the Simularium viewer

Simularium Engine

simularium-engine is a C++ application that integrates existing biological spatial simulation engines and serves simulation data, both pre-computed and live calculating, to front end websites via websockets.

Simularium integrates existing spatial simulation software:

  • ReaDDy : Reaction Diffusion & Dynamics
  • Cytosim: Cytoskeletal Dynamics
  • and more to be added

Quick Start

Dependencies

  • blosc
  • hdf5
  • blas
  • lapack
  • openssl

On Mac, install homebrew and run: brew install cmake hdf5 openssl mkcert

On Arch Linux, run: sudo pacman -S cmake hdf5 blosc blas lapack openssl mkcert

On Ubuntu 19.04, install mkcert and run: apt-get update && apt-get install -y build-essential cmake curl git libblas-dev libhdf5-dev liblapack-dev python-dev libssl-dev libcurl4-openssl-dev libblosc1

Docker

  1. Install docker
  2. Clone the repository locally: git clone --recursive *repository-address* (If already cloned, you may have to git submodule update --init --recursive thereafter.)
  3. To build the container, run: sudo docker build -t agentsim-dev .
  4. To run the container, run: sudo docker run -it -p 9002:9002 agentsim-dev:latest agentsim_server.exe --no-exit
  5. Mount the tls certificate to /etc/ssl/tls.crt
  6. Mount the tls key to /etc/ssl/tls.key

Native

  1. Clone the repository locally: git clone --recursive *repository-address* (If already cloned, you may have to git submodule update --init --recursive thereafter.)
  2. Create a new directory for the build: e.g. '~/Documents/build/simularium'
  3. Navigate to the new directory in a terminal and run: sudo [path to repository]/local_build.sh
  4. From the same terminal window, run: sudo chown -R $USER *
  5. From the same terminal window, run: source [path to repository]/setup_env.sh
  6. To run the server, run: ./agentsim_server.exe --no-exit
  7. To rebuild/update after source changes, run make from the build directory

Tests

This project uses the google test framework To run the tests, navigate to the build directory and run: ./agentsim_tests

AWS Authentication

Simularium stores various runtime files on Amazon Web Services (AWS) S3. The following steps are necessary to allow a local build to upload to S3.

  1. Install the aws-cli
  2. Configure the aws-cli using your private key; the region is us-east-2

Simularium will use the credentials configured above to upload, download, and otherwise interact with other components of the application setup on AWS. The application should function normally without these credentials, but will be unable to upload files to the AWS S3 repository.


Development

See CONTRIBUTING.md for information related to developing the code.

About

C++ back end application that interfaces with biological simulation engines and serves simulation data to the front end website

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5