Skip to content

About

NFsim library and standalone executable.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

NFsim v1.11 with vCell changes

This project provides both a standalone NFsim C++ executable and Python bindings (pyvcell_nfsim).

VCell solver release

Each vX.Y.Z release also carries the executable VCell runs, NFsim_x64, as linux64.tgz, linux64arm.tgz, mac64.tgz (universal) and win64.zip with SHA256SUMS, and the solver image ghcr.io/virtualcell/vcell-nfsim:X.Y.Z with its Apptainer SIF oras://ghcr.io/virtualcell/vcell-nfsim_singularity:X.Y.Z (VCell messaging on, -tid <n>). See SOLVER-RELEASE.md for the layout, the container entry point, the checks and how to cut a release. To build NFsim_x64 locally: cmake --build build --target NFsim_x64 (add -DOPTION_VCELL_MESSAGING=ON at configure time for broker messaging; needs libcurl).

Building the C++ Executable

Linux/macOS

$ cmake -S . -B build
$ cmake --build build --config Release

Windows

> cmake -S . -B build -G "Visual Studio 17 2022" -A x64
> cmake --build build --config Release

The executable will be available at build/bin/NFsim.

Building the Python Package

Prerequisites

  • Python 3.9 or later
  • pybind11
  • scikit-build-core

Install in Development Mode

$ pip install -e .

This will build the Python extension module and install it in editable mode.

Build a Wheel

$ pip install build
$ python -m build

The wheel will be created in the dist/ directory.

Install from Source

$ pip install .

Testing

C++ Tests

Run the NFsim model tests:

$ ctest --test-dir build -C Release --output-on-failure

Note: -C <config> is required for multi-config generators to specify which build configuration to test.

Python Tests

First, activate your virtual environment (if not already activated):

$ source .venv/bin/activate  # On Linux/macOS
$ .venv\Scripts\activate     # On Windows

Install the package in editable mode:

$ pip install -e .

Then install test dependencies:

$ pip install pytest

Run the smoke test:

$ pytest tests/test_pyvcell_nfsim.py -v

To run all tests:

$ pytest -v

Clean Build Artifacts

C++ Build

Remove build artifacts:

$ cmake --build build --target clean

Completely remove the build directory:

# Linux/macOS
$ rm -rf build

# Windows (cmd)
> rmdir /s /q build

# Windows (PowerShell)
> Remove-Item -Recurse -Force build

Python Build

$ rm -rf dist/ build/ *.egg-info

About

NFsim library and standalone executable.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages