# SIMsalabim-python
## Description
**pySIMsalabim** is a Python package used to interface drift-diffusion simulator [SIMsalabim](https://github.com/kostergroup/SIMsalabim) with Python. It provides many useful tools to set up and run simulations, as well as to analyze and visualize the results.
## Authors
* [Vincent M. Le Corre](https://github.com/VMLC-PV)
* [Sander Heester](https://github.com/sheester)
* [L. Jan Anton Koster](https://github.com/kostergroup)
## Institutions
<img src="./docs/logo/rug_logo.png" alt="RuG logo" width="100px"> Zernike Institute for Advanced Materials, University of Groningen, The Netherlands
<img src="./docs/logo/sdu_logo.png" alt="SDU logo" width="100px"> 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](https://pypi.org/project/pySIMsalabim/)
```bash
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:
```bash
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:
```bash
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:
```bash
conda create -n pySIMsalabim --clone base
```
## Additional necessary installs for the drift-diffusion software
### SIMsalabim
The drift-diffusion simulations are run using the [SIMsalabim](https://github.com/kostergroup/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](https://github.com/kostergroup/SIMsalabim). 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:
```python
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:
```bash
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](https://www.freepascal.org/download.html).
You can test if the installation worked by running the following command in the terminal:
```bash
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](https://www.gnu.org/software/parallel/) package instead of the default threading or multiprocessing from Python. To install on Linux, run in the terminal:
```bash
sudo apt-get update
sudo apt-get install parallel
```
You can also use [Anaconda](https://anaconda.org/):
```bash
conda install -c conda-forge parallel
```
To test if the installation worked, run the following command in the terminal:
```bash
parallel --help
```
Alternatively, you can run the following Python script to install GNU parallel:
```python
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:
```bash
pytest pySIMsalabim
```
Note that `pytest` needs to be installed to run the tests. You can install `pytest` by running the following command:
```bash
pip install pytest
```
## Disclaimer
This repository is still under development. If you find any bugs or have any questions, please contact us.
Raw data
{
"_id": null,
"home_page": "https://github.com/kostergroup/pySIMsalabim",
"name": "pySIMsalabim",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "Drift-diffusion, semiconductor, solar cells",
"author": "Vincent M. Le Corre, Sander Heester, L. Jan Anton Koster",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f8/34/29788cea8556d2fe3483ffc87bd0c308a1de535c3318635e0b9c80420b45/pysimsalabim-1.tar.gz",
"platform": null,
"description": "# SIMsalabim-python\n\n## Description\n**pySIMsalabim** is a Python package used to interface drift-diffusion simulator [SIMsalabim](https://github.com/kostergroup/SIMsalabim) with Python. It provides many useful tools to set up and run simulations, as well as to analyze and visualize the results.\n\n## Authors\n* [Vincent M. Le Corre](https://github.com/VMLC-PV)\n* [Sander Heester](https://github.com/sheester)\n* [L. Jan Anton Koster](https://github.com/kostergroup)\n\n## Institutions\n<img src=\"./docs/logo/rug_logo.png\" alt=\"RuG logo\" width=\"100px\"> Zernike Institute for Advanced Materials, University of Groningen, The Netherlands\n\n<img src=\"./docs/logo/sdu_logo.png\" alt=\"SDU logo\" width=\"100px\"> CAPE - Centre for Advanced Photovoltaics and Thin-film Energy Devices, University of Southern Denmark, Denmark\n\n## Installation\n\n### With pip\nTo install pySIMsalabim with pip you have two options:\n\n1. Install pySIMsalabim using the [PyPI repository](https://pypi.org/project/pySIMsalabim/)\n\n ```bash\n pip install pySIMsalabim \n ```\n\n2. 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:\n\n ```bash\n pip install -r requirements.txt\n ```\n\n 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.\n\n### With conda\nTo install pySIMsalabim, you need to clone the repository and install the requirements. The requirements can be installed with the following command:\n\n```bash\nconda create -n pySIMsalabim \nconda activate pySIMsalabim\nconda install --file requirements.txt\n```\n\nIf you want, you can also clone your base environment by replacing the first line with:\n\n```bash\nconda create -n pySIMsalabim --clone base\n```\n\n## Additional necessary installs for the drift-diffusion software\n\n### SIMsalabim\nThe drift-diffusion simulations are run using the [SIMsalabim](https://github.com/kostergroup/SIMsalabim) package. Therefore, you need to install SIMsalabim prior to running any simulations.\n\nAll the details to install SIMsalabim are detailed in the [GitHub repository](https://github.com/kostergroup/SIMsalabim). 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:\n\n```python\nimport os\nimport pySIMsalabim\nfrom pySIMsalabim.install.get_SIMsalabim import *\n\ncwd = os.getcwd()\ninstall_SIMsalabim(cwd)\n```\n\n### Free Pascal Compiler\nSIMsalabim 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:\n\n```bash\nsudo apt-get update\nsudo apt-get install fp-compiler\n```\n\nRunning 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](https://www.freepascal.org/download.html).\n\nYou can test if the installation worked by running the following command in the terminal:\n\n```bash\nfpc -iV\n```\n\nThis 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.\n\n### Parallel simulations\nOn Linux, you have the option to run the simulations using the [GNU parallel](https://www.gnu.org/software/parallel/) package instead of the default threading or multiprocessing from Python. To install on Linux, run in the terminal:\n\n```bash\nsudo apt-get update\nsudo apt-get install parallel\n```\n\nYou can also use [Anaconda](https://anaconda.org/):\n\n```bash\nconda install -c conda-forge parallel\n```\n\nTo test if the installation worked, run the following command in the terminal:\n\n```bash\nparallel --help\n```\n\nAlternatively, you can run the following Python script to install GNU parallel:\n\n```python\nimport os\nimport pySIMsalabim\nfrom pySIMsalabim.install.get_gnu_parallel import *\n\ninstall_GNU_parallel_Linux()\n```\n\nIf you are on Windows, pySIMsalabim will use the default threading or multiprocessing from Python.\n\n## Testing\nThe 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:\n\n```bash\npytest pySIMsalabim\n```\n\nNote that `pytest` needs to be installed to run the tests. You can install `pytest` by running the following command:\n\n```bash\npip install pytest\n```\n\n## Disclaimer\nThis repository is still under development. If you find any bugs or have any questions, please contact us.\n\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": null,
"version": "1",
"project_urls": {
"Download": "https://github.com/kostergroup/pySIMsalabim/v1.tar.gz",
"Homepage": "https://github.com/kostergroup/pySIMsalabim"
},
"split_keywords": [
"drift-diffusion",
" semiconductor",
" solar cells"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "70cdfc968c30c1bac74703d431ab2835f0ef0689b6cb310efdb0e4a27739af03",
"md5": "ff5314f0fb16bf68f807f418b4fb3449",
"sha256": "bc1b6639cc7b56ee560947822e214622d4c31c4b62d280cd3e124bbca6b3e94e"
},
"downloads": -1,
"filename": "pySIMsalabim-1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff5314f0fb16bf68f807f418b4fb3449",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 102187,
"upload_time": "2025-02-05T15:22:45",
"upload_time_iso_8601": "2025-02-05T15:22:45.306488Z",
"url": "https://files.pythonhosted.org/packages/70/cd/fc968c30c1bac74703d431ab2835f0ef0689b6cb310efdb0e4a27739af03/pySIMsalabim-1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cfef20bab212face041d9de8903a6bb972dfb27080becb16b8701c3091145468",
"md5": "0d682e04e907b647ba5fa25af68e5971",
"sha256": "e03b267a47d72e0014b0261b789340900604b83119149a7abd19c30819b0030c"
},
"downloads": -1,
"filename": "pySIMSalabim-1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d682e04e907b647ba5fa25af68e5971",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 102197,
"upload_time": "2025-02-05T15:13:47",
"upload_time_iso_8601": "2025-02-05T15:13:47.378474Z",
"url": "https://files.pythonhosted.org/packages/cf/ef/20bab212face041d9de8903a6bb972dfb27080becb16b8701c3091145468/pySIMSalabim-1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f83429788cea8556d2fe3483ffc87bd0c308a1de535c3318635e0b9c80420b45",
"md5": "2f38661ecd79e9b438de90e0b5ed844c",
"sha256": "a22b029a82f22b32d7b694ed3930898c5263f15916f8a42dd501097e76ad98eb"
},
"downloads": -1,
"filename": "pysimsalabim-1.tar.gz",
"has_sig": false,
"md5_digest": "2f38661ecd79e9b438de90e0b5ed844c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 77239,
"upload_time": "2025-02-05T15:13:49",
"upload_time_iso_8601": "2025-02-05T15:13:49.790132Z",
"url": "https://files.pythonhosted.org/packages/f8/34/29788cea8556d2fe3483ffc87bd0c308a1de535c3318635e0b9c80420b45/pysimsalabim-1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 15:13:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kostergroup",
"github_project": "pySIMsalabim",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "plotly",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "joblib",
"specs": []
},
{
"name": "lmfit",
"specs": []
},
{
"name": "jupyterlab",
"specs": []
},
{
"name": "ipympl",
"specs": []
},
{
"name": "seaborn",
"specs": []
},
{
"name": "gitpython",
"specs": []
},
{
"name": "openpyxl",
"specs": []
}
],
"lcname": "pysimsalabim"
}