Skip to main content

SIMsalabim-python

Description

pySIMsalabim is a Python package used to interface drift-diffusion simulator SIMsalabim with Python. It provides many useful tools to set up and run simulations, as well as to analyze and visualize the results.

Authors

Institutions

RuG logo Zernike Institute for Advanced Materials, University of Groningen, The Netherlands

SDU logo CAPE - Centre for Advanced Photovoltaics and Thin-film Energy Devices, University of Southern Denmark, Denmark

Installation

With pip

To install pySIMsalabim with pip you have two options:

  1. Install pySIMsalabim using the PyPI repository

    pip install pySIMsalabim 
    
  2. Install pySIMsalabim using the GitHub repository. First, you need to clone the repository and install the requirements. The requirements can be installed with the following command:

    pip install -r requirements.txt
    

    Similarly to the conda installation, if you plan on using the BoTorch/Ax optimizer you need to use the requirements_torch_CPU.txt file or install PyTorch with the correct version for your system with the requirements.txt file.

With conda

To install pySIMsalabim, you need to clone the repository and install the requirements. The requirements can be installed with the following command:

conda create -n pySIMsalabim 
conda activate pySIMsalabim
conda install --file requirements.txt

If you want, you can also clone your base environment by replacing the first line with:

conda create -n pySIMsalabim --clone base

Additional necessary installs for the drift-diffusion software

SIMsalabim

The drift-diffusion simulations are run using the SIMsalabim package. Therefore, you need to install SIMsalabim prior to running any simulations.

All the details to install SIMsalabim are detailed in the GitHub repository. To make sure that you are running the latest version of SIMsalabim, check the repository regularly. You can also install SIMsalabim by running the following Python script:

import os
import pySIMsalabim
from pySIMsalabim.install.get_SIMsalabim import *

cwd = os.getcwd()
install_SIMsalabim(cwd)

Free Pascal Compiler

SIMsalabim needs the Free Pascal Compiler to compile the Pascal code. In the previous step, you have the option to use the precompiled binaries from the SIMsalabim repository (for Windows and Linux). If you want to compile the code yourself, you need to install the Free Pascal Compiler. The Free Pascal Compiler can be installed on Linux by running the following command:

sudo apt-get update
sudo apt-get install fp-compiler

Running the install_SIMsalabim function will also install the Free Pascal Compiler for you if you are on Linux. For Windows, you can download the Free Pascal Compiler from the Free Pascal website.

You can test if the installation worked by running the following command in the terminal:

fpc -iV

This should return the version of the Free Pascal Compiler. Note that the version of the Free Pascal Compiler should be 3.2.2 or higher.

Parallel simulations

On Linux, you have the option to run the simulations using the GNU parallel package instead of the default threading or multiprocessing from Python. To install on Linux, run in the terminal:

sudo apt-get update
sudo apt-get install parallel

You can also use Anaconda:

conda install -c conda-forge parallel

To test if the installation worked, run the following command in the terminal:

parallel --help

Alternatively, you can run the following Python script to install GNU parallel:

import os
import pySIMsalabim
from pySIMsalabim.install.get_gnu_parallel import *

install_GNU_parallel_Linux()

If you are on Windows, pySIMsalabim will use the default threading or multiprocessing from Python.

Testing

The physics and implementation of the drift-diffusion simulator are tested in the main SIMsalabim repository. The tests in pySIMsalabim are mainly focused on the interface between SIMsalabim and Python. The tests can be run using the following command:

pytest pySIMsalabim

Note that pytest needs to be installed to run the tests. You can install pytest by running the following command:

pip install pytest

Disclaimer

This repository is still under development. If you find any bugs or have any questions, please contact us.

Metadata

Release files for pySIMsalabim 1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pySIMsalabim 1
File Size Uploaded Provenance
pysimsalabim-1.tar.gz 77.2 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pySIMsalabim 1
File Interpreter ABI Platform
pySIMsalabim-1-py3-none-any.whl Python 3 none any Details
pySIMSalabim-1-py3-none-any.whl Python 3 none any Details

Total release size: 281.6 kB

Release files / pysimsalabim-1.tar.gz

Download URL pysimsalabim-1.tar.gz
Size 77.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a22b029a82f22b32d7b694ed3930898c5263f15916f8a42dd501097e76ad98eb
BLAKE2b-256 checksum
How to use checksums
f83429788cea8556d2fe3483ffc87bd0c308a1de535c3318635e0b9c80420b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / pySIMsalabim-1-py3-none-any.whl

Download URL pySIMsalabim-1-py3-none-any.whl
Size 102.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc1b6639cc7b56ee560947822e214622d4c31c4b62d280cd3e124bbca6b3e94e
BLAKE2b-256 checksum
How to use checksums
70cdfc968c30c1bac74703d431ab2835f0ef0689b6cb310efdb0e4a27739af03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / pySIMSalabim-1-py3-none-any.whl

Download URL pySIMSalabim-1-py3-none-any.whl
Size 102.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e03b267a47d72e0014b0261b789340900604b83119149a7abd19c30819b0030c
BLAKE2b-256 checksum
How to use checksums
cfef20bab212face041d9de8903a6bb972dfb27080becb16b8701c3091145468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for pySIMsalabim 1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page