Similarity based Molecular Generation (SiMGen)
SiMGen is a local similarity based molecular generation method. It uses a pretrained MACE model to generate local molecular descriptors and a time-dependent similarity kernel to generate new molecules.
SiMGen is available as an online web-tool at https://zndraw.icp.uni-stuttgart.de/.
The paper is now out on Nature Communications!
Installation
The package can be installed using pip:
pip install simgen
Note that the analysis code requires the rdkit package, which is not installed by default. To install it, run
pip install simgen[all]
Usage
There are two main ways to use the package: via a command line interface or interactively using ZnDraw.
Interactive use
We host an online gpu-powered web-tool at https://zndraw.icp.uni-stuttgart.de/. The documentation for the web-tool is available here.
However, you can also run ZnDraw locally. After installing the package, you can run the following command to start the web-tool:
zndraw --port 1234 PATH_TO_XYZ_FILE # Path is optional; Use --no-browser for remote servers
# Do the next command in a separate terminal
simgen connect --device cuda # default port is 1234
If you want to try out linker generation, add the --add-linkers flag to the simgen connect command.
Run simgen connect --help for more information.
CLI use
For unconstrained generation, you can use the following command:
python scripts/generate_mols_cli.py --save-path PATH_TO_SAVE_MOLS \
--num-molecules 10 \
--num-heavy-atoms 9 \
--track-trajectories \
--prior-gaussian-covariance 1. 1. 0.1 # controls the shape of the prior
To construct molecules with more complicated shapes, you will have to manually define the shape via a point cloud prior. See scripts/paper_examples/generate_macrocycles.py for an example.
docker-compose setup
Given you have setup ZnDraw you can setup SiMGen via docker-compose.yaml as follows:
services:
simgen:
image: pythonf/simgen
restart: always
command: simgen connect --device "cuda" --mace-model-name "medium_spice" --reference-data-name "simgen_reference_data_medium" --path . --hydrogenation-model-name hydromace_spice_only
environment:
- SIMGEN_AUTH_TOKEN=XXXXXXXXXXX
- SIMGEN_URL=XXXXXXXXXXX
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
References
If you use SiMGen in your research, please cite the following paper:
@article{elijosius_zero_2025,
title = {Zero shot molecular generation via similarity kernels},
volume = {16},
issn = {2041-1723},
url = {https://www.nature.com/articles/s41467-025-60963-3},
doi = {10.1038/s41467-025-60963-3},
number = {1},
urldate = {2025-07-01},
journal = {Nature Communications},
author = {Elijošius, Rokas and Zills, Fabian and Batatia, Ilyes and Norwood, Sam Walton and Kovács, Dávid Péter and Holm, Christian and Csányi, Gábor},
month = jul,
year = {2025},
note = {Publisher: Nature Publishing Group},
pages = {1--16},
}
License
The code is licensed under the MIT license. See LICENSE for more information.
Metadata
Release files for simgen 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simgen-0.3.1.tar.gz | 61.0 kB | Without provenance | Details for simgen-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simgen-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for simgen-0.3.1-py3-none-any.whl |
Total release size: 118.2 kB
Release files / simgen-0.3.1.tar.gz
| Download URL | simgen-0.3.1.tar.gz |
|---|---|
| Size | 61.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2eb60c24c1b1abca8b2918abfa31582ed016189094e27bada8f4b2bddceb3789
|
|
BLAKE2b-256 checksum How to use checksums |
e6fd82495c6cbd84aa47bea6de75b6ec3bd99e6829593143dbf2ee170f8ca96e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / simgen-0.3.1-py3-none-any.whl
| Download URL | simgen-0.3.1-py3-none-any.whl |
|---|---|
| Size | 57.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0afc10c2a494816ea6ad16e6c9723797820346b27d93cba8425a913e4ab9b7b
|
|
BLAKE2b-256 checksum How to use checksums |
1575e9b6a3400bcafd40d974ee60ad46b233f641e42419eecdfaf4824d432151
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for simgen 0.3.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.