1. Getting Started

The aim of this document is to get you started quickly with STEPS by working through a number of examples that highlight the various capabilities of this software package. However, before you can do that, you need to have a working copy of STEPS installed on your computer. So we will first explain the requirements of STEPS in terms of third party software and prior knowledge and then how to compile and install on your system.

1.1. Docker Image

For user who want to quickly try STEPS without compilation from the source code, we provide a prebuilt Docker image of the latest release, which can be accessed via

1.2. Install from source code

1.2.1. Minimum Prerequisites

  1. C++ compiler supporting c++17 (e.g. gcc 7.4, clang 6)

  2. Python3 (3.8.x or above, 3.9.x or above if using stepsblender python package)

  3. CMake

  4. pkg-config (not installed by default on Mac, brew install pkg-config to install it)

  5. Cython

  6. BLAS/OpenBLAS

  7. Boost

  8. Eigen3

  9. METIS

  10. build Python package

1.2.2. Optional Prerequisites

  1. To use the parallel SSA solver TetOpSplit: MPI libraries (e.g. MPICH )

  2. To use the parallel EField solver: PETSc

  3. To use the distributed mesh solver: Omega_h (bundled with STEPS by default)

1.2.4. Obtaining STEPS Source code

STEPS 3.0.0 and above are available at https://github.com/CNS-OIST/STEPS

Old releases (STEPS 2.2.0 and below) can be downloaded at https://sourceforge.net/projects/steps/files/.

1.2.5. Install From Github Repository

This section describes how to compile and install STEPS on a generic Unix-like system, including Linux and MacOSX. Official support of Windows platform is discontinued.

1.2.5.1. New installation or upgrade from a STEPS version above 3.0.0

To install STEPS from source code, first clone the repository using the folowing command in terminal:

git clone https://github.com/CNS-OIST/STEPS.git

If not already installed, install the build python package

pip install --user build

then run the following commands to compile the source code and install:

cd STEPS
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make
make install

Note that, by default, STEPS will install its python dependencies during the call to make install, this can be prevented by setting the following cmake option:

cmake -DSTEPS_INSTALL_PYTHON_DEPS=False ..

The python packages that would be installed are listed here.

You can change the installation location by changing the prefix in CMake:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/MY_INSTALL_LOCATION ..

MPI and PETSc libraries are automatically detected in the system. If the user wants to manually choose to build STEPS with / without them they can set:

cmake -DUSE_MPI=[True|False] -DUSE_PETSC=[True|False] ..

By default, the distributed mesh solver DistTetOpSplit will be built. If the user wants to manually choose to build STEPS with / without this they can set:

cmake -DSTEPS_USE_DIST_MESH=[True|False] ..

Please refer to CMAKE documentation for customizing your installation. Advanced installation customization and frequently encountered problems during installations are discussed in the Customizing STEPS installation page.

1.2.6. Test the Installation

After installation, you can check the STEPS installation with the following commands:

python -c "import steps; steps._greet()"

If STEPS is installed successfully, you should be able to see similar information as below:

STochastic Engine for Pathway Simulation
Version:  5.0.2
License:  GPL3.0
Website:  steps.sourceforge.net
CXX Binding: Cython

Just about every task related to building a model, describing the geometry and running a simulation in STEPS involves creating objects in Python and utilising the object methods (so it is highly recommend that you are familiar with Python objects and comfortable using them, though you will gain more experience by working through the examples in this document). The class definitions for these objects reside in Python modules in the steps directory (steps.model, steps.geom, steps.sim etc). So to test installation, try to create your first STEPS object. What this object is and how it is used will become clear in the next chapter. So, from the Python prompt:

[1]:
import steps.interface
from steps.model import *

mdl = Model()

Installation was successful if you can create this object.

1.3. Running STEPS

1.3.1. Serial Mode

It is often more convenient to run STEPS simulation with pre-written Python scripts, which is the main focus of this manual. You can execute a simulation script in serial mode like this:

python my_serial_simulation.py

1.3.2. Parallel Mode

Parallel simulations need to be executed in terminal with the mpirun command, or similar command in your MPI distribution:

mpirun -n <n_procs> python my_parallel_simulation.py

<n_proc> is the number of MPI processes to be created for the parallel simulation. Please refer to the documentation of your MPI solution for further customization.

1.3.3. Validation and Examples

  • Short validation tests (runnning in a few minutes) can be found in the release repository, under test/validation and can be run from the build directory with ctest -R .*validation.*

  • Longer validation tests (using serial and parallel solvers) can be found in the STEPS_Validation repository

  • Examples of STEPS simulations, as well as user manual can be found in the STEPS_Example repository